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/execution.cc

Issue 8417035: Introduce extended mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed more comments. Created 9 years, 1 month 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/compiler.cc ('k') | src/factory.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 *pending_exception = false; 150 *pending_exception = false;
151 151
152 if (!callable->IsJSFunction()) { 152 if (!callable->IsJSFunction()) {
153 callable = TryGetFunctionDelegate(callable, pending_exception); 153 callable = TryGetFunctionDelegate(callable, pending_exception);
154 if (*pending_exception) return callable; 154 if (*pending_exception) return callable;
155 } 155 }
156 Handle<JSFunction> func = Handle<JSFunction>::cast(callable); 156 Handle<JSFunction> func = Handle<JSFunction>::cast(callable);
157 157
158 // In non-strict mode, convert receiver. 158 // In non-strict mode, convert receiver.
159 if (convert_receiver && !receiver->IsJSReceiver() && 159 if (convert_receiver && !receiver->IsJSReceiver() &&
160 !func->shared()->native() && !func->shared()->strict_mode()) { 160 !func->shared()->native() && func->shared()->is_classic_mode()) {
161 if (receiver->IsUndefined() || receiver->IsNull()) { 161 if (receiver->IsUndefined() || receiver->IsNull()) {
162 Object* global = func->context()->global()->global_receiver(); 162 Object* global = func->context()->global()->global_receiver();
163 // Under some circumstances, 'global' can be the JSBuiltinsObject 163 // Under some circumstances, 'global' can be the JSBuiltinsObject
164 // In that case, don't rewrite. 164 // In that case, don't rewrite.
165 // (FWIW, the same holds for GetIsolate()->global()->global_receiver().) 165 // (FWIW, the same holds for GetIsolate()->global()->global_receiver().)
166 if (!global->IsJSBuiltinsObject()) receiver = Handle<Object>(global); 166 if (!global->IsJSBuiltinsObject()) receiver = Handle<Object>(global);
167 } else { 167 } else {
168 receiver = ToObject(receiver, pending_exception); 168 receiver = ToObject(receiver, pending_exception);
169 } 169 }
170 if (*pending_exception) return callable; 170 if (*pending_exception) return callable;
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 return isolate->TerminateExecution(); 898 return isolate->TerminateExecution();
899 } 899 }
900 if (stack_guard->IsInterrupted()) { 900 if (stack_guard->IsInterrupted()) {
901 stack_guard->Continue(INTERRUPT); 901 stack_guard->Continue(INTERRUPT);
902 return isolate->StackOverflow(); 902 return isolate->StackOverflow();
903 } 903 }
904 return isolate->heap()->undefined_value(); 904 return isolate->heap()->undefined_value();
905 } 905 }
906 906
907 } } // namespace v8::internal 907 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698