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

Side by Side Diff: src/accessors.cc

Issue 1309883002: Get rid of CompilationInfo::GenerateCodeStub method. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | src/code-stubs.cc » ('j') | src/compiler.h » ('J')
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 // 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/accessors.h" 5 #include "src/accessors.h"
6 6
7 #include "src/api.h" 7 #include "src/api.h"
8 #include "src/contexts.h" 8 #include "src/contexts.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/execution.h" 10 #include "src/execution.h"
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 HandleScope scope(isolate); 970 HandleScope scope(isolate);
971 Handle<JSFunction> function = 971 Handle<JSFunction> function =
972 Handle<JSFunction>::cast(Utils::OpenHandle(*info.Holder())); 972 Handle<JSFunction>::cast(Utils::OpenHandle(*info.Holder()));
973 973
974 int length = 0; 974 int length = 0;
975 if (function->shared()->is_compiled()) { 975 if (function->shared()->is_compiled()) {
976 length = function->shared()->length(); 976 length = function->shared()->length();
977 } else { 977 } else {
978 // If the function isn't compiled yet, the length is not computed 978 // If the function isn't compiled yet, the length is not computed
979 // correctly yet. Compile it now and return the right length. 979 // correctly yet. Compile it now and return the right length.
980 if (Compiler::EnsureCompiled(function, KEEP_EXCEPTION)) { 980 if (Compiler::Compile(function, KEEP_EXCEPTION)) {
981 length = function->shared()->length(); 981 length = function->shared()->length();
982 } 982 }
983 if (isolate->has_pending_exception()) { 983 if (isolate->has_pending_exception()) {
984 isolate->OptionalRescheduleException(false); 984 isolate->OptionalRescheduleException(false);
985 } 985 }
986 } 986 }
987 Handle<Object> result(Smi::FromInt(length), isolate); 987 Handle<Object> result(Smi::FromInt(length), isolate);
988 info.GetReturnValue().Set(Utils::ToLocal(result)); 988 info.GetReturnValue().Set(Utils::ToLocal(result));
989 } 989 }
990 990
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1489 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport); 1489 Handle<Object> getter = v8::FromCData(isolate, &ModuleGetExport);
1490 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport); 1490 Handle<Object> setter = v8::FromCData(isolate, &ModuleSetExport);
1491 info->set_getter(*getter); 1491 info->set_getter(*getter);
1492 if (!(attributes & ReadOnly)) info->set_setter(*setter); 1492 if (!(attributes & ReadOnly)) info->set_setter(*setter);
1493 return info; 1493 return info;
1494 } 1494 }
1495 1495
1496 1496
1497 } // namespace internal 1497 } // namespace internal
1498 } // namespace v8 1498 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/code-stubs.cc » ('j') | src/compiler.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698