| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/bailout-reason.h" | 7 #include "src/bailout-reason.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/field-index.h" | 9 #include "src/field-index.h" |
| 10 #include "src/hydrogen.h" | 10 #include "src/hydrogen.h" |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 | 226 |
| 227 // Generate the new code. | 227 // Generate the new code. |
| 228 MacroAssembler masm(isolate(), NULL, 256); | 228 MacroAssembler masm(isolate(), NULL, 256); |
| 229 | 229 |
| 230 { | 230 { |
| 231 // Update the static counter each time a new code stub is generated. | 231 // Update the static counter each time a new code stub is generated. |
| 232 isolate()->counters()->code_stubs()->Increment(); | 232 isolate()->counters()->code_stubs()->Increment(); |
| 233 | 233 |
| 234 // Generate the code for the stub. | 234 // Generate the code for the stub. |
| 235 masm.set_generating_stub(true); | 235 masm.set_generating_stub(true); |
| 236 // TODO(yangguo): remove this once we can serialize IC stubs. |
| 237 masm.enable_serializer(); |
| 236 NoCurrentFrameScope scope(&masm); | 238 NoCurrentFrameScope scope(&masm); |
| 237 GenerateLightweightMiss(&masm, miss); | 239 GenerateLightweightMiss(&masm, miss); |
| 238 } | 240 } |
| 239 | 241 |
| 240 // Create the code object. | 242 // Create the code object. |
| 241 CodeDesc desc; | 243 CodeDesc desc; |
| 242 masm.GetCode(&desc); | 244 masm.GetCode(&desc); |
| 243 | 245 |
| 244 // Copy the generated code into a heap object. | 246 // Copy the generated code into a heap object. |
| 245 Code::Flags flags = Code::ComputeFlags( | 247 Code::Flags flags = Code::ComputeFlags( |
| (...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2012 | 2014 |
| 2013 // Probe the stub cache. | 2015 // Probe the stub cache. |
| 2014 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( | 2016 Code::Flags flags = Code::RemoveTypeAndHolderFromFlags( |
| 2015 Code::ComputeHandlerFlags(Code::LOAD_IC)); | 2017 Code::ComputeHandlerFlags(Code::LOAD_IC)); |
| 2016 Add<HTailCallThroughMegamorphicCache>(receiver, name, flags); | 2018 Add<HTailCallThroughMegamorphicCache>(receiver, name, flags); |
| 2017 | 2019 |
| 2018 // We never continue. | 2020 // We never continue. |
| 2019 return graph()->GetConstant0(); | 2021 return graph()->GetConstant0(); |
| 2020 } | 2022 } |
| 2021 } } // namespace v8::internal | 2023 } } // namespace v8::internal |
| OLD | NEW |