Update V8 to r7427: Initial merge by git
As required by WebKit r82507
Change-Id: I7ae83ef3f689356043b4929255b7c1dd31d8c5df
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index 8ee4038..98a5870 100755
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -31,6 +31,7 @@
#include "v8.h"
+#include "isolate.h"
#include "token.h"
#include "scanner.h"
#include "parser.h"
@@ -153,7 +154,7 @@
// Parser/Scanner needs a stack limit.
int marker;
- i::StackGuard::SetStackLimit(
+ i::Isolate::Current()->stack_guard()->SetStackLimit(
reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
for (int i = 0; tests[i]; i++) {
@@ -184,7 +185,7 @@
v8::Persistent<v8::Context> context = v8::Context::New();
v8::Context::Scope context_scope(context);
int marker;
- i::StackGuard::SetStackLimit(
+ i::Isolate::Current()->stack_guard()->SetStackLimit(
reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
// Source containing functions that might be lazily compiled and all types
@@ -245,7 +246,7 @@
TEST(StandAlonePreParser) {
int marker;
- i::StackGuard::SetStackLimit(
+ i::Isolate::Current()->stack_guard()->SetStackLimit(
reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
const char* programs[] = {
@@ -257,14 +258,14 @@
NULL
};
- uintptr_t stack_limit = i::StackGuard::real_climit();
+ uintptr_t stack_limit = ISOLATE->stack_guard()->real_climit();
for (int i = 0; programs[i]; i++) {
const char* program = programs[i];
i::Utf8ToUC16CharacterStream stream(
reinterpret_cast<const i::byte*>(program),
static_cast<unsigned>(strlen(program)));
i::CompleteParserRecorder log;
- i::V8JavaScriptScanner scanner;
+ i::V8JavaScriptScanner scanner(ISOLATE->scanner_constants());
scanner.Initialize(&stream);
v8::preparser::PreParser::PreParseResult result =
@@ -281,7 +282,7 @@
TEST(RegressChromium62639) {
int marker;
- i::StackGuard::SetStackLimit(
+ ISOLATE->stack_guard()->SetStackLimit(
reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
const char* program = "var x = 'something';\n"
@@ -306,7 +307,7 @@
// the block could be lazily compiled, and an extra, unexpected,
// entry was added to the data.
int marker;
- i::StackGuard::SetStackLimit(
+ ISOLATE->stack_guard()->SetStackLimit(
reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
const char* program =
@@ -342,7 +343,7 @@
TEST(PreParseOverflow) {
int marker;
- i::StackGuard::SetStackLimit(
+ ISOLATE->stack_guard()->SetStackLimit(
reinterpret_cast<uintptr_t>(&marker) - 128 * 1024);
size_t kProgramSize = 1024 * 1024;
@@ -351,13 +352,13 @@
memset(*program, '(', kProgramSize);
program[kProgramSize] = '\0';
- uintptr_t stack_limit = i::StackGuard::real_climit();
+ uintptr_t stack_limit = ISOLATE->stack_guard()->real_climit();
i::Utf8ToUC16CharacterStream stream(
reinterpret_cast<const i::byte*>(*program),
static_cast<unsigned>(kProgramSize));
i::CompleteParserRecorder log;
- i::V8JavaScriptScanner scanner;
+ i::V8JavaScriptScanner scanner(ISOLATE->scanner_constants());
scanner.Initialize(&stream);
@@ -405,10 +406,10 @@
}
i::Vector<const char> ascii_vector(ascii_source, static_cast<int>(length));
i::Handle<i::String> ascii_string(
- i::Factory::NewStringFromAscii(ascii_vector));
+ FACTORY->NewStringFromAscii(ascii_vector));
TestExternalResource resource(*uc16_buffer, length);
i::Handle<i::String> uc16_string(
- i::Factory::NewExternalStringFromTwoByte(&resource));
+ FACTORY->NewExternalStringFromTwoByte(&resource));
i::ExternalTwoByteStringUC16CharacterStream uc16_stream(
i::Handle<i::ExternalTwoByteString>::cast(uc16_string), start, end);
@@ -575,7 +576,7 @@
i::Token::Value* expected_tokens,
int skip_pos = 0, // Zero means not skipping.
int skip_to = 0) {
- i::V8JavaScriptScanner scanner;
+ i::V8JavaScriptScanner scanner(ISOLATE->scanner_constants());
scanner.Initialize(stream);
int i = 0;
@@ -654,7 +655,7 @@
i::Utf8ToUC16CharacterStream stream(
reinterpret_cast<const i::byte*>(re_source),
static_cast<unsigned>(strlen(re_source)));
- i::V8JavaScriptScanner scanner;
+ i::V8JavaScriptScanner scanner(ISOLATE->scanner_constants());
scanner.Initialize(&stream);
i::Token::Value start = scanner.peek();