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

Side by Side Diff: src/execution.cc

Issue 894683003: Introduce LanguageMode, drop StrictMode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased (w/ conflicts) Created 5 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
« no previous file with comments | « src/elements.cc ('k') | src/factory.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/execution.h" 5 #include "src/execution.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/codegen.h" 8 #include "src/codegen.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 Handle<Object> argv[], 159 Handle<Object> argv[],
160 bool convert_receiver) { 160 bool convert_receiver) {
161 if (!callable->IsJSFunction()) { 161 if (!callable->IsJSFunction()) {
162 ASSIGN_RETURN_ON_EXCEPTION( 162 ASSIGN_RETURN_ON_EXCEPTION(
163 isolate, callable, TryGetFunctionDelegate(isolate, callable), Object); 163 isolate, callable, TryGetFunctionDelegate(isolate, callable), Object);
164 } 164 }
165 Handle<JSFunction> func = Handle<JSFunction>::cast(callable); 165 Handle<JSFunction> func = Handle<JSFunction>::cast(callable);
166 166
167 // In sloppy mode, convert receiver. 167 // In sloppy mode, convert receiver.
168 if (convert_receiver && !receiver->IsJSReceiver() && 168 if (convert_receiver && !receiver->IsJSReceiver() &&
169 !func->shared()->native() && 169 !func->shared()->native() && is_sloppy(func->shared()->language_mode())) {
170 func->shared()->strict_mode() == SLOPPY) {
171 if (receiver->IsUndefined() || receiver->IsNull()) { 170 if (receiver->IsUndefined() || receiver->IsNull()) {
172 receiver = handle(func->global_proxy()); 171 receiver = handle(func->global_proxy());
173 DCHECK(!receiver->IsJSBuiltinsObject()); 172 DCHECK(!receiver->IsJSBuiltinsObject());
174 } else { 173 } else {
175 ASSIGN_RETURN_ON_EXCEPTION( 174 ASSIGN_RETURN_ON_EXCEPTION(
176 isolate, receiver, ToObject(isolate, receiver), Object); 175 isolate, receiver, ToObject(isolate, receiver), Object);
177 } 176 }
178 } 177 }
179 178
180 return Invoke(false, func, receiver, argc, argv); 179 return Invoke(false, func, receiver, argc, argv);
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 } 744 }
746 745
747 isolate_->counters()->stack_interrupts()->Increment(); 746 isolate_->counters()->stack_interrupts()->Increment();
748 isolate_->counters()->runtime_profiler_ticks()->Increment(); 747 isolate_->counters()->runtime_profiler_ticks()->Increment();
749 isolate_->runtime_profiler()->OptimizeNow(); 748 isolate_->runtime_profiler()->OptimizeNow();
750 749
751 return isolate_->heap()->undefined_value(); 750 return isolate_->heap()->undefined_value();
752 } 751 }
753 752
754 } } // namespace v8::internal 753 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/elements.cc ('k') | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698