Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Unified Diff: test/cctest/test-parsing.cc

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-mark-compact.cc ('k') | test/cctest/test-platform-linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
===================================================================
--- test/cctest/test-parsing.cc (revision 7267)
+++ test/cctest/test-parsing.cc (working copy)
@@ -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.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.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.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.Initialize(&stream);
i::Token::Value start = scanner.peek();
« no previous file with comments | « test/cctest/test-mark-compact.cc ('k') | test/cctest/test-platform-linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698