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

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

Issue 733253004: PropertyDetails cleanup: NORMAL property type merged with FIELD. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: cleanup Created 6 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
« 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 void Runtime::InitializeIntrinsicFunctionNames(Isolate* isolate, 74 void Runtime::InitializeIntrinsicFunctionNames(Isolate* isolate,
75 Handle<NameDictionary> dict) { 75 Handle<NameDictionary> dict) {
76 DCHECK(dict->NumberOfElements() == 0); 76 DCHECK(dict->NumberOfElements() == 0);
77 HandleScope scope(isolate); 77 HandleScope scope(isolate);
78 for (int i = 0; i < kNumFunctions; ++i) { 78 for (int i = 0; i < kNumFunctions; ++i) {
79 const char* name = kIntrinsicFunctions[i].name; 79 const char* name = kIntrinsicFunctions[i].name;
80 if (name == NULL) continue; 80 if (name == NULL) continue;
81 Handle<NameDictionary> new_dict = NameDictionary::Add( 81 Handle<NameDictionary> new_dict = NameDictionary::Add(
82 dict, isolate->factory()->InternalizeUtf8String(name), 82 dict, isolate->factory()->InternalizeUtf8String(name),
83 Handle<Smi>(Smi::FromInt(i), isolate), 83 Handle<Smi>(Smi::FromInt(i), isolate), PropertyDetails(NONE, FIELD, 0));
84 PropertyDetails(NONE, NORMAL, Representation::None()));
85 // The dictionary does not need to grow. 84 // The dictionary does not need to grow.
86 CHECK(new_dict.is_identical_to(dict)); 85 CHECK(new_dict.is_identical_to(dict));
87 } 86 }
88 } 87 }
89 88
90 89
91 const Runtime::Function* Runtime::FunctionForName(Handle<String> name) { 90 const Runtime::Function* Runtime::FunctionForName(Handle<String> name) {
92 Heap* heap = name->GetHeap(); 91 Heap* heap = name->GetHeap();
93 int entry = heap->intrinsic_function_names()->FindEntry(name); 92 int entry = heap->intrinsic_function_names()->FindEntry(name);
94 if (entry != kNotFound) { 93 if (entry != kNotFound) {
(...skipping 19 matching lines...) Expand all
114 return &(kIntrinsicFunctions[static_cast<int>(id)]); 113 return &(kIntrinsicFunctions[static_cast<int>(id)]);
115 } 114 }
116 115
117 116
118 std::ostream& operator<<(std::ostream& os, Runtime::FunctionId id) { 117 std::ostream& operator<<(std::ostream& os, Runtime::FunctionId id) {
119 return os << Runtime::FunctionForId(id)->name; 118 return os << Runtime::FunctionForId(id)->name;
120 } 119 }
121 120
122 } // namespace internal 121 } // namespace internal
123 } // namespace v8 122 } // 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