summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLeon Clarke <leonclarke@google.com>2010-02-03 11:58:03 +0000
committerLeon Clarke <leonclarke@google.com>2010-02-03 11:58:03 +0000
commit4515c472dc3e5ed2448a564600976759e569a0a8 (patch)
tree67d539a5e9fa0e72e2490426693bf73d1e36173f /tools
parentd91b9f7d46489a9ee00f9cb415630299c76a502b (diff)
downloadandroid_external_v8-4515c472dc3e5ed2448a564600976759e569a0a8.tar.gz
android_external_v8-4515c472dc3e5ed2448a564600976759e569a0a8.tar.bz2
android_external_v8-4515c472dc3e5ed2448a564600976759e569a0a8.zip
Update v8 to bleeding_edge revision 3784
Diffstat (limited to 'tools')
-rw-r--r--tools/csvparser.js59
-rw-r--r--tools/gyp/v8.gyp5
-rw-r--r--tools/visual_studio/v8_base.vcproj20
-rw-r--r--tools/visual_studio/v8_base_arm.vcproj20
-rw-r--r--tools/visual_studio/v8_base_x64.vcproj26
5 files changed, 90 insertions, 40 deletions
diff --git a/tools/csvparser.js b/tools/csvparser.js
index 9e58deae..6e101e20 100644
--- a/tools/csvparser.js
+++ b/tools/csvparser.js
@@ -39,17 +39,17 @@ devtools.profiler.CsvParser = function() {
/**
- * A regex for matching a trailing quote.
+ * A regex for matching a CSV field.
* @private
*/
-devtools.profiler.CsvParser.TRAILING_QUOTE_RE_ = /\"$/;
+devtools.profiler.CsvParser.CSV_FIELD_RE_ = /^"((?:[^"]|"")*)"|([^,]*)/;
/**
* A regex for matching a double quote.
* @private
*/
-devtools.profiler.CsvParser.DOUBLE_QUOTE_RE_ = /\"\"/g;
+devtools.profiler.CsvParser.DOUBLE_QUOTE_RE_ = /""/g;
/**
@@ -58,41 +58,26 @@ devtools.profiler.CsvParser.DOUBLE_QUOTE_RE_ = /\"\"/g;
* @param {string} line Input line.
*/
devtools.profiler.CsvParser.prototype.parseLine = function(line) {
- var insideQuotes = false;
+ var fieldRe = devtools.profiler.CsvParser.CSV_FIELD_RE_;
+ var doubleQuoteRe = devtools.profiler.CsvParser.DOUBLE_QUOTE_RE_;
+ var pos = 0;
+ var endPos = line.length;
var fields = [];
- var prevPos = 0;
- for (var i = 0, n = line.length; i < n; ++i) {
- switch (line.charAt(i)) {
- case ',':
- if (!insideQuotes) {
- fields.push(line.substring(prevPos, i));
- prevPos = i + 1;
- }
- break;
- case '"':
- if (!insideQuotes) {
- insideQuotes = true;
- // Skip the leading quote.
- prevPos++;
- } else {
- if (i + 1 < n && line.charAt(i + 1) != '"') {
- insideQuotes = false;
- } else {
- i++;
- }
- }
- break;
- }
- }
- if (n > 0) {
- fields.push(line.substring(prevPos));
- }
-
- for (i = 0; i < fields.length; ++i) {
- // Eliminate trailing quotes.
- fields[i] = fields[i].replace(devtools.profiler.CsvParser.TRAILING_QUOTE_RE_, '');
- // Convert quoted quotes into single ones.
- fields[i] = fields[i].replace(devtools.profiler.CsvParser.DOUBLE_QUOTE_RE_, '"');
+ if (endPos > 0) {
+ do {
+ var fieldMatch = fieldRe.exec(line.substr(pos));
+ if (typeof fieldMatch[1] === "string") {
+ var field = fieldMatch[1];
+ pos += field.length + 3; // Skip comma and quotes.
+ fields.push(field.replace(doubleQuoteRe, '"'));
+ } else {
+ // The second field pattern will match anything, thus
+ // in the worst case the match will be an empty string.
+ var field = fieldMatch[2];
+ pos += field.length + 1; // Skip comma.
+ fields.push(field);
+ }
+ } while (pos <= endPos);
}
return fields;
};
diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp
index acf51001..f2d1b98e 100644
--- a/tools/gyp/v8.gyp
+++ b/tools/gyp/v8.gyp
@@ -252,6 +252,8 @@
'../../src/counters.cc',
'../../src/counters.h',
'../../src/cpu.h',
+ '../../src/data-flow.cc',
+ '../../src/data-flow.h',
'../../src/dateparser.cc',
'../../src/dateparser.h',
'../../src/dateparser-inl.h',
@@ -410,6 +412,7 @@
'../../src/arm/cpu-arm.cc',
'../../src/arm/debug-arm.cc',
'../../src/arm/disasm-arm.cc',
+ '../../src/arm/fast-codegen-arm.cc',
'../../src/arm/frames-arm.cc',
'../../src/arm/frames-arm.h',
'../../src/arm/full-codegen-arm.cc',
@@ -448,6 +451,7 @@
'../../src/ia32/cpu-ia32.cc',
'../../src/ia32/debug-ia32.cc',
'../../src/ia32/disasm-ia32.cc',
+ '../../src/ia32/fast-codegen-ia32.cc',
'../../src/ia32/frames-ia32.cc',
'../../src/ia32/frames-ia32.h',
'../../src/ia32/full-codegen-ia32.cc',
@@ -477,6 +481,7 @@
'../../src/x64/cpu-x64.cc',
'../../src/x64/debug-x64.cc',
'../../src/x64/disasm-x64.cc',
+ '../../src/x64/fast-codegen-x64.cc',
'../../src/x64/frames-x64.cc',
'../../src/x64/frames-x64.h',
'../../src/x64/full-codegen-x64.cc',
diff --git a/tools/visual_studio/v8_base.vcproj b/tools/visual_studio/v8_base.vcproj
index f95f2279..e58e8ff3 100644
--- a/tools/visual_studio/v8_base.vcproj
+++ b/tools/visual_studio/v8_base.vcproj
@@ -337,6 +337,14 @@
>
</File>
<File
+ RelativePath="..\..\src\data-flow.cc"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\data-flow.h"
+ >
+ </File>
+ <File
RelativePath="..\..\src\dateparser.cc"
>
</File>
@@ -388,6 +396,18 @@
RelativePath="..\..\src\factory.h"
>
</File>
+ <File
+ RelativePath="..\..\src\ia32\fast-codegen-ia32.cc"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\fast-codegen.cc"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\fast-codegen.h"
+ >
+ </File>
<File
RelativePath="..\..\src\flags.cc"
>
diff --git a/tools/visual_studio/v8_base_arm.vcproj b/tools/visual_studio/v8_base_arm.vcproj
index a8f17228..4b37b538 100644
--- a/tools/visual_studio/v8_base_arm.vcproj
+++ b/tools/visual_studio/v8_base_arm.vcproj
@@ -345,6 +345,14 @@
>
</File>
<File
+ RelativePath="..\..\src\data-flow.cc"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\data-flow.h"
+ >
+ </File>
+ <File
RelativePath="..\..\src\dateparser.cc"
>
</File>
@@ -396,6 +404,18 @@
RelativePath="..\..\src\factory.h"
>
</File>
+ <File
+ RelativePath="..\..\src\arm\fast-codegen-arm.cc"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\fast-codegen.cc"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\fast-codegen.h"
+ >
+ </File>
<File
RelativePath="..\..\src\flags.cc"
>
diff --git a/tools/visual_studio/v8_base_x64.vcproj b/tools/visual_studio/v8_base_x64.vcproj
index 2c22280a..b6d5c7d8 100644
--- a/tools/visual_studio/v8_base_x64.vcproj
+++ b/tools/visual_studio/v8_base_x64.vcproj
@@ -337,6 +337,14 @@
>
</File>
<File
+ RelativePath="..\..\src\data-flow.cc"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\data-flow.h"
+ >
+ </File>
+ <File
RelativePath="..\..\src\dateparser.cc"
>
</File>
@@ -389,6 +397,18 @@
>
</File>
<File
+ RelativePath="..\..\src\x64\fast-codegen-x64.cc"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\fast-codegen.cc"
+ >
+ </File>
+ <File
+ RelativePath="..\..\src\fast-codegen.h"
+ >
+ </File>
+ <File
RelativePath="..\..\src\flags.cc"
>
</File>
@@ -425,15 +445,15 @@
>
</File>
<File
- RelativePath="..\..\src\full-codegen.cc"
+ RelativePath="..\..\src\x64\full-codegen-x64.cc"
>
</File>
<File
- RelativePath="..\..\src\full-codegen.h"
+ RelativePath="..\..\src\full-codegen.cc"
>
</File>
<File
- RelativePath="..\..\src\x64\full-codegen-x64.cc"
+ RelativePath="..\..\src\full-codegen.h"
>
</File>
<File