| OLD | NEW |
| 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/code-stubs.h" | 5 #include "src/code-stubs.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 | 8 |
| 9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| 11 #include "src/code-factory.h" | 11 #include "src/code-factory.h" |
| 12 #include "src/code-stub-assembler.h" | 12 #include "src/code-stub-assembler.h" |
| 13 #include "src/factory.h" | 13 #include "src/factory.h" |
| 14 #include "src/gdb-jit.h" | 14 #include "src/gdb-jit.h" |
| 15 #include "src/ic/accessor-assembler.h" | 15 #include "src/ic/accessor-assembler.h" |
| 16 #include "src/ic/handler-compiler.h" | 16 #include "src/ic/handler-compiler.h" |
| 17 #include "src/ic/ic-stats.h" |
| 17 #include "src/ic/ic.h" | 18 #include "src/ic/ic.h" |
| 18 #include "src/macro-assembler.h" | 19 #include "src/macro-assembler.h" |
| 20 #include "src/tracing/tracing-category-observer.h" |
| 19 | 21 |
| 20 namespace v8 { | 22 namespace v8 { |
| 21 namespace internal { | 23 namespace internal { |
| 22 | 24 |
| 23 using compiler::CodeAssemblerState; | 25 using compiler::CodeAssemblerState; |
| 24 | 26 |
| 25 RUNTIME_FUNCTION(UnexpectedStubMiss) { | 27 RUNTIME_FUNCTION(UnexpectedStubMiss) { |
| 26 FATAL("Unexpected deopt of a stub"); | 28 FATAL("Unexpected deopt of a stub"); |
| 27 return Smi::kZero; | 29 return Smi::kZero; |
| 28 } | 30 } |
| (...skipping 2254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2283 Node* context = assembler.Parameter(4); | 2285 Node* context = assembler.Parameter(4); |
| 2284 assembler.TailCallRuntime(Runtime::kCreateObjectLiteral, context, closure, | 2286 assembler.TailCallRuntime(Runtime::kCreateObjectLiteral, context, closure, |
| 2285 literals_index, constant_properties, flags); | 2287 literals_index, constant_properties, flags); |
| 2286 } | 2288 } |
| 2287 | 2289 |
| 2288 template<class StateType> | 2290 template<class StateType> |
| 2289 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) { | 2291 void HydrogenCodeStub::TraceTransition(StateType from, StateType to) { |
| 2290 // Note: Although a no-op transition is semantically OK, it is hinting at a | 2292 // Note: Although a no-op transition is semantically OK, it is hinting at a |
| 2291 // bug somewhere in our state transition machinery. | 2293 // bug somewhere in our state transition machinery. |
| 2292 DCHECK(from != to); | 2294 DCHECK(from != to); |
| 2293 if (!FLAG_trace_ic) return; | 2295 if (V8_LIKELY(!FLAG_ic_stats)) return; |
| 2296 if (FLAG_ic_stats & |
| 2297 v8::tracing::TracingCategoryObserver::ENABLED_BY_TRACING) { |
| 2298 auto ic_stats = ICStats::instance(); |
| 2299 ic_stats->Begin(); |
| 2300 ICInfo& ic_info = ic_stats->Current(); |
| 2301 ic_info.type = MajorName(MajorKey()); |
| 2302 ic_info.state = ToString(from); |
| 2303 ic_info.state += "=>"; |
| 2304 ic_info.state += ToString(to); |
| 2305 ic_stats->End(); |
| 2306 return; |
| 2307 } |
| 2294 OFStream os(stdout); | 2308 OFStream os(stdout); |
| 2295 os << "["; | 2309 os << "["; |
| 2296 PrintBaseName(os); | 2310 PrintBaseName(os); |
| 2297 os << ": " << from << "=>" << to << "]" << std::endl; | 2311 os << ": " << from << "=>" << to << "]" << std::endl; |
| 2298 } | 2312 } |
| 2299 | 2313 |
| 2300 void CallICStub::PrintState(std::ostream& os) const { // NOLINT | 2314 void CallICStub::PrintState(std::ostream& os) const { // NOLINT |
| 2301 os << state(); | 2315 os << state(); |
| 2302 } | 2316 } |
| 2303 | 2317 |
| (...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3214 } | 3228 } |
| 3215 | 3229 |
| 3216 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) | 3230 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) |
| 3217 : PlatformCodeStub(isolate) {} | 3231 : PlatformCodeStub(isolate) {} |
| 3218 | 3232 |
| 3219 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate) | 3233 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate) |
| 3220 : PlatformCodeStub(isolate) {} | 3234 : PlatformCodeStub(isolate) {} |
| 3221 | 3235 |
| 3222 } // namespace internal | 3236 } // namespace internal |
| 3223 } // namespace v8 | 3237 } // namespace v8 |
| OLD | NEW |