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

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

Issue 996133002: correctly invalidate global cells (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup Created 5 years, 9 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/property-details.h ('k') | src/runtime/runtime-debug.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/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/runtime/runtime.h" 7 #include "src/runtime/runtime.h"
8 #include "src/runtime/runtime-utils.h" 8 #include "src/runtime/runtime-utils.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 void Runtime::InitializeIntrinsicFunctionNames(Isolate* isolate, 50 void Runtime::InitializeIntrinsicFunctionNames(Isolate* isolate,
51 Handle<NameDictionary> dict) { 51 Handle<NameDictionary> dict) {
52 DCHECK(dict->NumberOfElements() == 0); 52 DCHECK(dict->NumberOfElements() == 0);
53 HandleScope scope(isolate); 53 HandleScope scope(isolate);
54 for (int i = 0; i < kNumFunctions; ++i) { 54 for (int i = 0; i < kNumFunctions; ++i) {
55 const char* name = kIntrinsicFunctions[i].name; 55 const char* name = kIntrinsicFunctions[i].name;
56 if (name == NULL) continue; 56 if (name == NULL) continue;
57 Handle<NameDictionary> new_dict = NameDictionary::Add( 57 Handle<NameDictionary> new_dict = NameDictionary::Add(
58 dict, isolate->factory()->InternalizeUtf8String(name), 58 dict, isolate->factory()->InternalizeUtf8String(name),
59 Handle<Smi>(Smi::FromInt(i), isolate), PropertyDetails(NONE, DATA, 0)); 59 Handle<Smi>(Smi::FromInt(i), isolate), PropertyDetails::Empty());
60 // The dictionary does not need to grow. 60 // The dictionary does not need to grow.
61 CHECK(new_dict.is_identical_to(dict)); 61 CHECK(new_dict.is_identical_to(dict));
62 } 62 }
63 } 63 }
64 64
65 65
66 const Runtime::Function* Runtime::FunctionForName(Handle<String> name) { 66 const Runtime::Function* Runtime::FunctionForName(Handle<String> name) {
67 Heap* heap = name->GetHeap(); 67 Heap* heap = name->GetHeap();
68 int entry = heap->intrinsic_function_names()->FindEntry(name); 68 int entry = heap->intrinsic_function_names()->FindEntry(name);
69 if (entry != kNotFound) { 69 if (entry != kNotFound) {
(...skipping 19 matching lines...) Expand all
89 return &(kIntrinsicFunctions[static_cast<int>(id)]); 89 return &(kIntrinsicFunctions[static_cast<int>(id)]);
90 } 90 }
91 91
92 92
93 std::ostream& operator<<(std::ostream& os, Runtime::FunctionId id) { 93 std::ostream& operator<<(std::ostream& os, Runtime::FunctionId id) {
94 return os << Runtime::FunctionForId(id)->name; 94 return os << Runtime::FunctionForId(id)->name;
95 } 95 }
96 96
97 } // namespace internal 97 } // namespace internal
98 } // namespace v8 98 } // namespace v8
OLDNEW
« no previous file with comments | « src/property-details.h ('k') | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698