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

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

Issue 2866008: [Isolates] Move contents of Top into Isolate.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: ensure we're synced Created 10 years, 6 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-api.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-compiler.cc
===================================================================
--- test/cctest/test-compiler.cc (revision 4906)
+++ test/cctest/test-compiler.cc (working copy)
@@ -34,7 +34,6 @@
#include "execution.h"
#include "factory.h"
#include "platform.h"
-#include "top.h"
#include "cctest.h"
using namespace v8::internal;
@@ -100,14 +99,14 @@
static Object* GetGlobalProperty(const char* name) {
Handle<String> symbol = Factory::LookupAsciiSymbol(name);
- return Top::context()->global()->GetProperty(*symbol);
+ return Isolate::Current()->context()->global()->GetProperty(*symbol);
}
static void SetGlobalProperty(const char* name, Object* value) {
Handle<Object> object(value);
Handle<String> symbol = Factory::LookupAsciiSymbol(name);
- Handle<JSObject> global(Top::context()->global());
+ Handle<JSObject> global(Isolate::Current()->context()->global());
SetProperty(global, symbol, object, NONE);
}
@@ -124,7 +123,7 @@
Handle<String>::null(),
NOT_NATIVES_CODE);
return Factory::NewFunctionFromSharedFunctionInfo(shared_function,
- Top::global_context());
+ Isolate::Current()->global_context());
}
@@ -137,7 +136,7 @@
if (fun.is_null()) return -1;
bool has_pending_exception;
- Handle<JSObject> global(Top::context()->global());
+ Handle<JSObject> global(Isolate::Current()->context()->global());
Execution::Call(fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
return GetGlobalProperty("result")->Number();
@@ -158,7 +157,7 @@
SetGlobalProperty("x", Smi::FromInt(x));
SetGlobalProperty("y", Smi::FromInt(y));
bool has_pending_exception;
- Handle<JSObject> global(Top::context()->global());
+ Handle<JSObject> global(Isolate::Current()->context()->global());
Execution::Call(fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
return GetGlobalProperty("result")->Number();
@@ -178,7 +177,7 @@
SetGlobalProperty("x", Smi::FromInt(x));
bool has_pending_exception;
- Handle<JSObject> global(Top::context()->global());
+ Handle<JSObject> global(Isolate::Current()->context()->global());
Execution::Call(fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
return GetGlobalProperty("result")->Number();
@@ -199,7 +198,7 @@
SetGlobalProperty("n", Smi::FromInt(n));
bool has_pending_exception;
- Handle<JSObject> global(Top::context()->global());
+ Handle<JSObject> global(Isolate::Current()->context()->global());
Execution::Call(fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
return GetGlobalProperty("result")->Number();
@@ -220,7 +219,7 @@
Handle<JSFunction> fun = Compile(source);
if (fun.is_null()) return;
bool has_pending_exception;
- Handle<JSObject> global(Top::context()->global());
+ Handle<JSObject> global(Isolate::Current()->context()->global());
Execution::Call(fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
}
@@ -253,7 +252,7 @@
Handle<JSFunction> fun = Compile(source);
CHECK(!fun.is_null());
bool has_pending_exception;
- Handle<JSObject> global(Top::context()->global());
+ Handle<JSObject> global(Isolate::Current()->context()->global());
Execution::Call(fun, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
CHECK_EQ(511.0, GetGlobalProperty("r")->Number());
@@ -268,11 +267,11 @@
Handle<JSFunction> fun = Compile(source);
CHECK(!fun.is_null());
bool has_pending_exception;
- Handle<JSObject> global(Top::context()->global());
+ Handle<JSObject> global(Isolate::Current()->context()->global());
Handle<Object> result =
Execution::Call(fun, global, 0, NULL, &has_pending_exception);
CHECK(has_pending_exception);
- CHECK_EQ(42.0, Top::pending_exception()->Number());
+ CHECK_EQ(42.0, Isolate::Current()->pending_exception()->Number());
}
@@ -293,13 +292,13 @@
// Run the generated code to populate the global object with 'foo'.
bool has_pending_exception;
- Handle<JSObject> global(Top::context()->global());
+ Handle<JSObject> global(Isolate::Current()->context()->global());
Execution::Call(fun0, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
Handle<Object> fun1 =
Handle<Object>(
- Top::context()->global()->GetProperty(
+ Isolate::Current()->context()->global()->GetProperty(
*Factory::LookupAsciiSymbol("foo")));
CHECK(fun1->IsJSFunction());
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698