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

Side by Side Diff: src/handles.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/func-name-inferrer.cc ('k') | src/heap.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 *value, 275 *value,
276 attributes, 276 attributes,
277 strict_mode), 277 strict_mode),
278 Object); 278 Object);
279 } 279 }
280 280
281 281
282 Handle<Object> GetProperty(Handle<JSReceiver> obj, 282 Handle<Object> GetProperty(Handle<JSReceiver> obj,
283 const char* name) { 283 const char* name) {
284 Isolate* isolate = obj->GetIsolate(); 284 Isolate* isolate = obj->GetIsolate();
285 Handle<String> str = isolate->factory()->LookupUtf8Symbol(name); 285 Handle<String> str = isolate->factory()->InternalizeUtf8String(name);
286 CALL_HEAP_FUNCTION(isolate, obj->GetProperty(*str), Object); 286 CALL_HEAP_FUNCTION(isolate, obj->GetProperty(*str), Object);
287 } 287 }
288 288
289 289
290 Handle<Object> GetProperty(Handle<Object> obj, 290 Handle<Object> GetProperty(Handle<Object> obj,
291 Handle<Object> key) { 291 Handle<Object> key) {
292 Isolate* isolate = Isolate::Current(); 292 Isolate* isolate = Isolate::Current();
293 CALL_HEAP_FUNCTION(isolate, 293 CALL_HEAP_FUNCTION(isolate,
294 Runtime::GetObjectProperty(isolate, obj, key), Object); 294 Runtime::GetObjectProperty(isolate, obj, key), Object);
295 } 295 }
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 #endif 602 #endif
603 } 603 }
604 } 604 }
605 return result; 605 return result;
606 } 606 }
607 607
608 608
609 Handle<Object> GetScriptNameOrSourceURL(Handle<Script> script) { 609 Handle<Object> GetScriptNameOrSourceURL(Handle<Script> script) {
610 Isolate* isolate = script->GetIsolate(); 610 Isolate* isolate = script->GetIsolate();
611 Handle<String> name_or_source_url_key = 611 Handle<String> name_or_source_url_key =
612 isolate->factory()->LookupOneByteSymbol( 612 isolate->factory()->InternalizeOneByteString(
613 STATIC_ASCII_VECTOR("nameOrSourceURL")); 613 STATIC_ASCII_VECTOR("nameOrSourceURL"));
614 Handle<JSValue> script_wrapper = GetScriptWrapper(script); 614 Handle<JSValue> script_wrapper = GetScriptWrapper(script);
615 Handle<Object> property = GetProperty(script_wrapper, 615 Handle<Object> property = GetProperty(script_wrapper,
616 name_or_source_url_key); 616 name_or_source_url_key);
617 ASSERT(property->IsJSFunction()); 617 ASSERT(property->IsJSFunction());
618 Handle<JSFunction> method = Handle<JSFunction>::cast(property); 618 Handle<JSFunction> method = Handle<JSFunction>::cast(property);
619 bool caught_exception; 619 bool caught_exception;
620 Handle<Object> result = Execution::TryCall(method, script_wrapper, 0, 620 Handle<Object> result = Execution::TryCall(method, script_wrapper, 0,
621 NULL, &caught_exception); 621 NULL, &caught_exception);
622 if (caught_exception) { 622 if (caught_exception) {
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 data->next = prev_next_; 932 data->next = prev_next_;
933 data->limit = prev_limit_; 933 data->limit = prev_limit_;
934 #ifdef DEBUG 934 #ifdef DEBUG
935 handles_detached_ = true; 935 handles_detached_ = true;
936 #endif 936 #endif
937 return deferred; 937 return deferred;
938 } 938 }
939 939
940 940
941 } } // namespace v8::internal 941 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/func-name-inferrer.cc ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698