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

Side by Side Diff: src/execution.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/debug.cc ('k') | src/extensions/externalize-string-extension.cc » ('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 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 Isolate* isolate = string->GetIsolate(); 676 Isolate* isolate = string->GetIsolate();
677 Factory* factory = isolate->factory(); 677 Factory* factory = isolate->factory();
678 678
679 int int_index = static_cast<int>(index); 679 int int_index = static_cast<int>(index);
680 if (int_index < 0 || int_index >= string->length()) { 680 if (int_index < 0 || int_index >= string->length()) {
681 return factory->undefined_value(); 681 return factory->undefined_value();
682 } 682 }
683 683
684 Handle<Object> char_at = 684 Handle<Object> char_at =
685 GetProperty(isolate->js_builtins_object(), 685 GetProperty(isolate->js_builtins_object(),
686 factory->char_at_symbol()); 686 factory->char_at_string());
687 if (!char_at->IsJSFunction()) { 687 if (!char_at->IsJSFunction()) {
688 return factory->undefined_value(); 688 return factory->undefined_value();
689 } 689 }
690 690
691 bool caught_exception; 691 bool caught_exception;
692 Handle<Object> index_object = factory->NewNumberFromInt(int_index); 692 Handle<Object> index_object = factory->NewNumberFromInt(int_index);
693 Handle<Object> index_arg[] = { index_object }; 693 Handle<Object> index_arg[] = { index_object };
694 Handle<Object> result = TryCall(Handle<JSFunction>::cast(char_at), 694 Handle<Object> result = TryCall(Handle<JSFunction>::cast(char_at),
695 string, 695 string,
696 ARRAY_SIZE(index_arg), 696 ARRAY_SIZE(index_arg),
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 Handle<Object> is_global) { 777 Handle<Object> is_global) {
778 Isolate* isolate = fun->GetIsolate(); 778 Isolate* isolate = fun->GetIsolate();
779 Handle<Object> args[] = { recv, fun, pos, is_global }; 779 Handle<Object> args[] = { recv, fun, pos, is_global };
780 bool caught_exception; 780 bool caught_exception;
781 Handle<Object> result = TryCall(isolate->get_stack_trace_line_fun(), 781 Handle<Object> result = TryCall(isolate->get_stack_trace_line_fun(),
782 isolate->js_builtins_object(), 782 isolate->js_builtins_object(),
783 ARRAY_SIZE(args), 783 ARRAY_SIZE(args),
784 args, 784 args,
785 &caught_exception); 785 &caught_exception);
786 if (caught_exception || !result->IsString()) { 786 if (caught_exception || !result->IsString()) {
787 return isolate->factory()->empty_symbol(); 787 return isolate->factory()->empty_string();
788 } 788 }
789 789
790 return Handle<String>::cast(result); 790 return Handle<String>::cast(result);
791 } 791 }
792 792
793 793
794 static Object* RuntimePreempt() { 794 static Object* RuntimePreempt() {
795 Isolate* isolate = Isolate::Current(); 795 Isolate* isolate = Isolate::Current();
796 796
797 // Clear the preempt request flag. 797 // Clear the preempt request flag.
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 } 941 }
942 if (stack_guard->IsInterrupted()) { 942 if (stack_guard->IsInterrupted()) {
943 stack_guard->Continue(INTERRUPT); 943 stack_guard->Continue(INTERRUPT);
944 return isolate->StackOverflow(); 944 return isolate->StackOverflow();
945 } 945 }
946 return isolate->heap()->undefined_value(); 946 return isolate->heap()->undefined_value();
947 } 947 }
948 948
949 949
950 } } // namespace v8::internal 950 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | src/extensions/externalize-string-extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698