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

Side by Side Diff: src/runtime/runtime.cc

Issue 1306993003: Call JS functions via native context instead of js builtins object. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 3 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/runtime/runtime.h ('k') | src/runtime/runtime-internal.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 // 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/runtime/runtime.h" 5 #include "src/runtime/runtime.h"
6 6
7 #include "src/contexts.h"
7 #include "src/handles-inl.h" 8 #include "src/handles-inl.h"
8 #include "src/heap/heap.h" 9 #include "src/heap/heap.h"
9 #include "src/isolate.h" 10 #include "src/isolate.h"
10 #include "src/runtime/runtime-utils.h" 11 #include "src/runtime/runtime-utils.h"
11 12
12 namespace v8 { 13 namespace v8 {
13 namespace internal { 14 namespace internal {
14 15
15 // Header of runtime functions. 16 // Header of runtime functions.
16 #define F(name, number_of_args, result_size) \ 17 #define F(name, number_of_args, result_size) \
(...skipping 17 matching lines...) Expand all
34 , 35 ,
35 36
36 37
37 #define I(name, number_of_args, result_size) \ 38 #define I(name, number_of_args, result_size) \
38 { \ 39 { \
39 Runtime::kInline##name, Runtime::INLINE, "_" #name, \ 40 Runtime::kInline##name, Runtime::INLINE, "_" #name, \
40 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size \ 41 FUNCTION_ADDR(Runtime_##name), number_of_args, result_size \
41 } \ 42 } \
42 , 43 ,
43 44
44
45 static const Runtime::Function kIntrinsicFunctions[] = { 45 static const Runtime::Function kIntrinsicFunctions[] = {
46 FOR_EACH_INTRINSIC(F) FOR_EACH_INTRINSIC(I)}; 46 FOR_EACH_INTRINSIC(F)
47 FOR_EACH_INTRINSIC(I)
48 };
47 49
48 #undef I 50 #undef I
49 #undef F 51 #undef F
50 52
51 53
52 void Runtime::InitializeIntrinsicFunctionNames(Isolate* isolate, 54 void Runtime::InitializeIntrinsicFunctionNames(Isolate* isolate,
53 Handle<NameDictionary> dict) { 55 Handle<NameDictionary> dict) {
54 DCHECK(dict->NumberOfElements() == 0); 56 DCHECK(dict->NumberOfElements() == 0);
55 HandleScope scope(isolate); 57 HandleScope scope(isolate);
56 for (int i = 0; i < kNumFunctions; ++i) { 58 for (int i = 0; i < kNumFunctions; ++i) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 return &(kIntrinsicFunctions[static_cast<int>(id)]); 93 return &(kIntrinsicFunctions[static_cast<int>(id)]);
92 } 94 }
93 95
94 96
95 std::ostream& operator<<(std::ostream& os, Runtime::FunctionId id) { 97 std::ostream& operator<<(std::ostream& os, Runtime::FunctionId id) {
96 return os << Runtime::FunctionForId(id)->name; 98 return os << Runtime::FunctionForId(id)->name;
97 } 99 }
98 100
99 } // namespace internal 101 } // namespace internal
100 } // namespace v8 102 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime.h ('k') | src/runtime/runtime-internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698