| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "v8.h" | 28 #include "v8.h" |
| 29 | 29 |
| 30 #include "api.h" | 30 #include "api.h" |
| 31 #include "arguments.h" | 31 #include "arguments.h" |
| 32 #include "ast.h" | 32 #include "ast.h" |
| 33 #include "code-stubs.h" | 33 #include "code-stubs.h" |
| 34 #include "cpu-profiler.h" | 34 #include "cpu-profiler.h" |
| 35 #include "gdb-jit.h" | 35 #include "gdb-jit.h" |
| 36 #include "ic-inl.h" | 36 #include "ic-inl.h" |
| 37 #include "stub-cache.h" | 37 #include "stub-cache.h" |
| 38 #include "type-info.h" |
| 38 #include "vm-state-inl.h" | 39 #include "vm-state-inl.h" |
| 39 | 40 |
| 40 namespace v8 { | 41 namespace v8 { |
| 41 namespace internal { | 42 namespace internal { |
| 42 | 43 |
| 43 // ----------------------------------------------------------------------- | 44 // ----------------------------------------------------------------------- |
| 44 // StubCache implementation. | 45 // StubCache implementation. |
| 45 | 46 |
| 46 | 47 |
| 47 StubCache::StubCache(Isolate* isolate) | 48 StubCache::StubCache(Isolate* isolate) |
| (...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 | 1094 |
| 1094 #undef CALL_LOGGER_TAG | 1095 #undef CALL_LOGGER_TAG |
| 1095 | 1096 |
| 1096 | 1097 |
| 1097 Handle<Code> StubCompiler::GetCodeWithFlags(Code::Flags flags, | 1098 Handle<Code> StubCompiler::GetCodeWithFlags(Code::Flags flags, |
| 1098 const char* name) { | 1099 const char* name) { |
| 1099 // Create code object in the heap. | 1100 // Create code object in the heap. |
| 1100 CodeDesc desc; | 1101 CodeDesc desc; |
| 1101 masm_.GetCode(&desc); | 1102 masm_.GetCode(&desc); |
| 1102 Handle<Code> code = factory()->NewCode(desc, flags, masm_.CodeObject()); | 1103 Handle<Code> code = factory()->NewCode(desc, flags, masm_.CodeObject()); |
| 1104 if (code->has_major_key()) { |
| 1105 code->set_major_key(CodeStub::NoCache); |
| 1106 } |
| 1103 #ifdef ENABLE_DISASSEMBLER | 1107 #ifdef ENABLE_DISASSEMBLER |
| 1104 if (FLAG_print_code_stubs) code->Disassemble(name); | 1108 if (FLAG_print_code_stubs) code->Disassemble(name); |
| 1105 #endif | 1109 #endif |
| 1106 return code; | 1110 return code; |
| 1107 } | 1111 } |
| 1108 | 1112 |
| 1109 | 1113 |
| 1110 Handle<Code> StubCompiler::GetCodeWithFlags(Code::Flags flags, | 1114 Handle<Code> StubCompiler::GetCodeWithFlags(Code::Flags flags, |
| 1111 Handle<Name> name) { | 1115 Handle<Name> name) { |
| 1112 return (FLAG_print_code_stubs && !name.is_null() && name->IsString()) | 1116 return (FLAG_print_code_stubs && !name.is_null() && name->IsString()) |
| 1113 ? GetCodeWithFlags(flags, *Handle<String>::cast(name)->ToCString()) | 1117 ? GetCodeWithFlags(flags, Handle<String>::cast(name)->ToCString().get()) |
| 1114 : GetCodeWithFlags(flags, NULL); | 1118 : GetCodeWithFlags(flags, NULL); |
| 1115 } | 1119 } |
| 1116 | 1120 |
| 1117 | 1121 |
| 1118 void StubCompiler::LookupPostInterceptor(Handle<JSObject> holder, | 1122 void StubCompiler::LookupPostInterceptor(Handle<JSObject> holder, |
| 1119 Handle<Name> name, | 1123 Handle<Name> name, |
| 1120 LookupResult* lookup) { | 1124 LookupResult* lookup) { |
| 1121 holder->LocalLookupRealNamedProperty(*name, lookup); | 1125 holder->LocalLookupRealNamedProperty(*name, lookup); |
| 1122 if (lookup->IsFound()) return; | 1126 if (lookup->IsFound()) return; |
| 1123 if (holder->GetPrototype()->IsNull()) return; | 1127 if (holder->GetPrototype()->IsNull()) return; |
| (...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1897 Handle<FunctionTemplateInfo>( | 1901 Handle<FunctionTemplateInfo>( |
| 1898 FunctionTemplateInfo::cast(signature->receiver())); | 1902 FunctionTemplateInfo::cast(signature->receiver())); |
| 1899 } | 1903 } |
| 1900 } | 1904 } |
| 1901 | 1905 |
| 1902 is_simple_api_call_ = true; | 1906 is_simple_api_call_ = true; |
| 1903 } | 1907 } |
| 1904 | 1908 |
| 1905 | 1909 |
| 1906 } } // namespace v8::internal | 1910 } } // namespace v8::internal |
| OLD | NEW |