| 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/api.h" | 7 #include "src/api.h" |
| 8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
| 9 #include "src/ast.h" | 9 #include "src/ast.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 Handle<Code> StubCompiler::GetCodeWithFlags(Code::Flags flags, | 680 Handle<Code> StubCompiler::GetCodeWithFlags(Code::Flags flags, |
| 681 const char* name) { | 681 const char* name) { |
| 682 // Create code object in the heap. | 682 // Create code object in the heap. |
| 683 CodeDesc desc; | 683 CodeDesc desc; |
| 684 masm_.GetCode(&desc); | 684 masm_.GetCode(&desc); |
| 685 Handle<Code> code = factory()->NewCode(desc, flags, masm_.CodeObject()); | 685 Handle<Code> code = factory()->NewCode(desc, flags, masm_.CodeObject()); |
| 686 if (code->has_major_key()) { | 686 if (code->has_major_key()) { |
| 687 code->set_major_key(CodeStub::NoCache); | 687 code->set_major_key(CodeStub::NoCache); |
| 688 } | 688 } |
| 689 #ifdef ENABLE_DISASSEMBLER | 689 #ifdef ENABLE_DISASSEMBLER |
| 690 if (FLAG_print_code_stubs) code->Disassemble(name); | 690 if (FLAG_print_code_stubs) { |
| 691 OFStream os(stdout); |
| 692 code->Disassemble(name, os); |
| 693 } |
| 691 #endif | 694 #endif |
| 692 return code; | 695 return code; |
| 693 } | 696 } |
| 694 | 697 |
| 695 | 698 |
| 696 Handle<Code> StubCompiler::GetCodeWithFlags(Code::Flags flags, | 699 Handle<Code> StubCompiler::GetCodeWithFlags(Code::Flags flags, |
| 697 Handle<Name> name) { | 700 Handle<Name> name) { |
| 698 return (FLAG_print_code_stubs && !name.is_null() && name->IsString()) | 701 return (FLAG_print_code_stubs && !name.is_null() && name->IsString()) |
| 699 ? GetCodeWithFlags(flags, Handle<String>::cast(name)->ToCString().get()) | 702 ? GetCodeWithFlags(flags, Handle<String>::cast(name)->ToCString().get()) |
| 700 : GetCodeWithFlags(flags, NULL); | 703 : GetCodeWithFlags(flags, NULL); |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1426 Handle<FunctionTemplateInfo>( | 1429 Handle<FunctionTemplateInfo>( |
| 1427 FunctionTemplateInfo::cast(signature->receiver())); | 1430 FunctionTemplateInfo::cast(signature->receiver())); |
| 1428 } | 1431 } |
| 1429 } | 1432 } |
| 1430 | 1433 |
| 1431 is_simple_api_call_ = true; | 1434 is_simple_api_call_ = true; |
| 1432 } | 1435 } |
| 1433 | 1436 |
| 1434 | 1437 |
| 1435 } } // namespace v8::internal | 1438 } } // namespace v8::internal |
| OLD | NEW |