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

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

Issue 12210083: Renamed "symbols" to "internalized strings" throughout the code base, (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed Yang's comments Created 7 years, 10 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
diff --git a/test/cctest/test-compiler.cc b/test/cctest/test-compiler.cc
index 0cca0c4fb2a5b52044e43633b050fdead2ec28f8..847a856ac4902f88596315044bb273591b7a88bc 100644
--- a/test/cctest/test-compiler.cc
+++ b/test/cctest/test-compiler.cc
@@ -94,17 +94,18 @@ static void InitializeVM() {
static MaybeObject* GetGlobalProperty(const char* name) {
- Handle<String> symbol = FACTORY->LookupUtf8Symbol(name);
- return Isolate::Current()->context()->global_object()->GetProperty(*symbol);
+ Handle<String> internalized_name = FACTORY->InternalizeUtf8String(name);
+ return Isolate::Current()->context()->global_object()->GetProperty(
+ *internalized_name);
}
static void SetGlobalProperty(const char* name, Object* value) {
Isolate* isolate = Isolate::Current();
Handle<Object> object(value);
- Handle<String> symbol = FACTORY->LookupUtf8Symbol(name);
+ Handle<String> internalized_name = FACTORY->InternalizeUtf8String(name);
Handle<JSObject> global(Isolate::Current()->context()->global_object());
- SetProperty(isolate, global, symbol, object, NONE, kNonStrictMode);
+ SetProperty(isolate, global, internalized_name, object, NONE, kNonStrictMode);
}
@@ -294,16 +295,16 @@ TEST(C2JSFrames) {
Execution::Call(fun0, global, 0, NULL, &has_pending_exception);
CHECK(!has_pending_exception);
- Object* foo_symbol =
- FACTORY->LookupOneByteSymbol(STATIC_ASCII_VECTOR("foo"))->
+ Object* foo_string =
+ FACTORY->InternalizeOneByteString(STATIC_ASCII_VECTOR("foo"))->
ToObjectChecked();
MaybeObject* fun1_object = Isolate::Current()->context()->global_object()->
- GetProperty(String::cast(foo_symbol));
+ GetProperty(String::cast(foo_string));
Handle<Object> fun1(fun1_object->ToObjectChecked());
CHECK(fun1->IsJSFunction());
Handle<Object> argv[] =
- { FACTORY->LookupOneByteSymbol(STATIC_ASCII_VECTOR("hello")) };
+ { FACTORY->InternalizeOneByteString(STATIC_ASCII_VECTOR("hello")) };
Execution::Call(Handle<JSFunction>::cast(fun1),
global,
ARRAY_SIZE(argv),
« 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