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

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

Issue 2036493006: Keep prototype maps in dictionary mode until ICs see them (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix tests & rebase Created 4 years, 6 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/elements.h" 8 #include "src/elements.h"
9 #include "src/factory.h" 9 #include "src/factory.h"
10 #include "src/isolate-inl.h" 10 #include "src/isolate-inl.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return HasEnumerableProperty(isolate, receiver, key); 103 return HasEnumerableProperty(isolate, receiver, key);
104 } 104 }
105 105
106 } // namespace 106 } // namespace
107 107
108 108
109 RUNTIME_FUNCTION(Runtime_ForInEnumerate) { 109 RUNTIME_FUNCTION(Runtime_ForInEnumerate) {
110 HandleScope scope(isolate); 110 HandleScope scope(isolate);
111 DCHECK_EQ(1, args.length()); 111 DCHECK_EQ(1, args.length());
112 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, receiver, 0); 112 CONVERT_ARG_HANDLE_CHECKED(JSReceiver, receiver, 0);
113 JSObject::MakePrototypesFast(receiver, true /* include_receiver */, isolate);
Toon Verwaest 2016/06/07 14:48:06 Given all these /* include_receiver */, what about
Jakob Kummerow 2016/06/08 12:19:00 Done.
113 RETURN_RESULT_OR_FAILURE(isolate, Enumerate(receiver)); 114 RETURN_RESULT_OR_FAILURE(isolate, Enumerate(receiver));
114 } 115 }
115 116
116 117
117 RUNTIME_FUNCTION_RETURN_TRIPLE(Runtime_ForInPrepare) { 118 RUNTIME_FUNCTION_RETURN_TRIPLE(Runtime_ForInPrepare) {
118 HandleScope scope(isolate); 119 HandleScope scope(isolate);
119 DCHECK_EQ(1, args.length()); 120 DCHECK_EQ(1, args.length());
120 Handle<JSReceiver> receiver = args.at<JSReceiver>(0); 121 Handle<JSReceiver> receiver = args.at<JSReceiver>(0);
121 Handle<Object> cache_type; 122 Handle<Object> cache_type;
122 if (!Enumerate(receiver).ToHandle(&cache_type)) { 123 if (!Enumerate(receiver).ToHandle(&cache_type)) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 SealHandleScope scope(isolate); 185 SealHandleScope scope(isolate);
185 DCHECK_EQ(1, args.length()); 186 DCHECK_EQ(1, args.length());
186 CONVERT_SMI_ARG_CHECKED(index, 0); 187 CONVERT_SMI_ARG_CHECKED(index, 0);
187 DCHECK_LE(0, index); 188 DCHECK_LE(0, index);
188 DCHECK_LT(index, Smi::kMaxValue); 189 DCHECK_LT(index, Smi::kMaxValue);
189 return Smi::FromInt(index + 1); 190 return Smi::FromInt(index + 1);
190 } 191 }
191 192
192 } // namespace internal 193 } // namespace internal
193 } // namespace v8 194 } // namespace v8
OLDNEW
« src/objects.cc ('K') | « src/objects-inl.h ('k') | test/mjsunit/dictionary-properties.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698