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

Side by Side Diff: src/ic/handler-compiler.cc

Issue 2460973003: [Tracing] Use TracingCategoryObserver in runtime statistics (Closed)
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/ic/handler-compiler.h" 5 #include "src/ic/handler-compiler.h"
6 6
7 #include "src/field-type.h" 7 #include "src/field-type.h"
8 #include "src/ic/call-optimization.h" 8 #include "src/ic/call-optimization.h"
9 #include "src/ic/handler-configuration-inl.h" 9 #include "src/ic/handler-configuration-inl.h"
10 #include "src/ic/ic-inl.h" 10 #include "src/ic/ic-inl.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 if (IC::ShouldPushPopSlotAndVector(kind())) { 217 if (IC::ShouldPushPopSlotAndVector(kind())) {
218 DiscardVectorAndSlot(); 218 DiscardVectorAndSlot();
219 } 219 }
220 GenerateLoadConstant(isolate()->factory()->undefined_value()); 220 GenerateLoadConstant(isolate()->factory()->undefined_value());
221 FrontendFooter(name, &miss); 221 FrontendFooter(name, &miss);
222 return GetCode(kind(), name); 222 return GetCode(kind(), name);
223 } 223 }
224 224
225 Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback( 225 Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback(
226 Handle<Name> name, Handle<AccessorInfo> callback, Handle<Code> slow_stub) { 226 Handle<Name> name, Handle<AccessorInfo> callback, Handle<Code> slow_stub) {
227 if (FLAG_runtime_call_stats) { 227 if (FLAG_runtime_stats) {
228 GenerateTailCall(masm(), slow_stub); 228 GenerateTailCall(masm(), slow_stub);
229 } 229 }
230 Register reg = Frontend(name); 230 Register reg = Frontend(name);
231 GenerateLoadCallback(reg, callback); 231 GenerateLoadCallback(reg, callback);
232 return GetCode(kind(), name); 232 return GetCode(kind(), name);
233 } 233 }
234 234
235 Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback( 235 Handle<Code> NamedLoadHandlerCompiler::CompileLoadCallback(
236 Handle<Name> name, const CallOptimization& call_optimization, 236 Handle<Name> name, const CallOptimization& call_optimization,
237 int accessor_index, Handle<Code> slow_stub) { 237 int accessor_index, Handle<Code> slow_stub) {
238 DCHECK(call_optimization.is_simple_api_call()); 238 DCHECK(call_optimization.is_simple_api_call());
239 if (FLAG_runtime_call_stats) { 239 if (FLAG_runtime_stats) {
240 GenerateTailCall(masm(), slow_stub); 240 GenerateTailCall(masm(), slow_stub);
241 } 241 }
242 Register holder = Frontend(name); 242 Register holder = Frontend(name);
243 GenerateApiAccessorCall(masm(), call_optimization, map(), receiver(), 243 GenerateApiAccessorCall(masm(), call_optimization, map(), receiver(),
244 scratch2(), false, no_reg, holder, accessor_index); 244 scratch2(), false, no_reg, holder, accessor_index);
245 return GetCode(kind(), name); 245 return GetCode(kind(), name);
246 } 246 }
247 247
248 248
249 void NamedLoadHandlerCompiler::InterceptorVectorSlotPush(Register holder_reg) { 249 void NamedLoadHandlerCompiler::InterceptorVectorSlotPush(Register holder_reg) {
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 GenerateStoreViaSetter(masm(), map(), receiver(), holder, accessor_index, 583 GenerateStoreViaSetter(masm(), map(), receiver(), holder, accessor_index,
584 expected_arguments, scratch2()); 584 expected_arguments, scratch2());
585 585
586 return GetCode(kind(), name); 586 return GetCode(kind(), name);
587 } 587 }
588 588
589 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback( 589 Handle<Code> NamedStoreHandlerCompiler::CompileStoreCallback(
590 Handle<JSObject> object, Handle<Name> name, 590 Handle<JSObject> object, Handle<Name> name,
591 const CallOptimization& call_optimization, int accessor_index, 591 const CallOptimization& call_optimization, int accessor_index,
592 Handle<Code> slow_stub) { 592 Handle<Code> slow_stub) {
593 if (FLAG_runtime_call_stats) { 593 if (FLAG_runtime_stats) {
594 GenerateTailCall(masm(), slow_stub); 594 GenerateTailCall(masm(), slow_stub);
595 } 595 }
596 Register holder = Frontend(name); 596 Register holder = Frontend(name);
597 if (Descriptor::kPassLastArgsOnStack) { 597 if (Descriptor::kPassLastArgsOnStack) {
598 __ LoadParameterFromStack<Descriptor>(value(), Descriptor::kValue); 598 __ LoadParameterFromStack<Descriptor>(value(), Descriptor::kValue);
599 } 599 }
600 GenerateApiAccessorCall(masm(), call_optimization, handle(object->map()), 600 GenerateApiAccessorCall(masm(), call_optimization, handle(object->map()),
601 receiver(), scratch2(), true, value(), holder, 601 receiver(), scratch2(), true, value(), holder,
602 accessor_index); 602 accessor_index);
603 return GetCode(kind(), name); 603 return GetCode(kind(), name);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 } 659 }
660 660
661 void ElementHandlerCompiler::CompileElementHandlers( 661 void ElementHandlerCompiler::CompileElementHandlers(
662 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) { 662 MapHandleList* receiver_maps, List<Handle<Object>>* handlers) {
663 for (int i = 0; i < receiver_maps->length(); ++i) { 663 for (int i = 0; i < receiver_maps->length(); ++i) {
664 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate())); 664 handlers->Add(GetKeyedLoadHandler(receiver_maps->at(i), isolate()));
665 } 665 }
666 } 666 }
667 } // namespace internal 667 } // namespace internal
668 } // namespace v8 668 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698