| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 code = compiler.CompileLoadInterceptor(receiver, holder, name); | 191 code = compiler.CompileLoadInterceptor(receiver, holder, name); |
| 192 if (code->IsFailure()) return code; | 192 if (code->IsFailure()) return code; |
| 193 PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name)); | 193 PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name)); |
| 194 Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code)); | 194 Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code)); |
| 195 if (result->IsFailure()) return result; | 195 if (result->IsFailure()) return result; |
| 196 } | 196 } |
| 197 return code; | 197 return code; |
| 198 } | 198 } |
| 199 | 199 |
| 200 | 200 |
| 201 Object* StubCache::ComputeLoadNormal(String* name, JSObject* receiver) { | 201 Object* StubCache::ComputeLoadNormal() { |
| 202 return Builtins::builtin(Builtins::LoadIC_Normal); | 202 return Builtins::builtin(Builtins::LoadIC_Normal); |
| 203 } | 203 } |
| 204 | 204 |
| 205 | 205 |
| 206 Object* StubCache::ComputeLoadGlobal(String* name, | 206 Object* StubCache::ComputeLoadGlobal(String* name, |
| 207 JSObject* receiver, | 207 JSObject* receiver, |
| 208 GlobalObject* holder, | 208 GlobalObject* holder, |
| 209 JSGlobalPropertyCell* cell, | 209 JSGlobalPropertyCell* cell, |
| 210 bool is_dont_delete) { | 210 bool is_dont_delete) { |
| 211 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, NORMAL); | 211 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::LOAD_IC, NORMAL); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 code = compiler.CompileStoreField(receiver, field_index, transition, name); | 364 code = compiler.CompileStoreField(receiver, field_index, transition, name); |
| 365 if (code->IsFailure()) return code; | 365 if (code->IsFailure()) return code; |
| 366 PROFILE(CodeCreateEvent(Logger::STORE_IC_TAG, Code::cast(code), name)); | 366 PROFILE(CodeCreateEvent(Logger::STORE_IC_TAG, Code::cast(code), name)); |
| 367 Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code)); | 367 Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code)); |
| 368 if (result->IsFailure()) return result; | 368 if (result->IsFailure()) return result; |
| 369 } | 369 } |
| 370 return code; | 370 return code; |
| 371 } | 371 } |
| 372 | 372 |
| 373 | 373 |
| 374 Object* StubCache::ComputeStoreNormal() { |
| 375 return Builtins::builtin(Builtins::StoreIC_Normal); |
| 376 } |
| 377 |
| 378 |
| 374 Object* StubCache::ComputeStoreGlobal(String* name, | 379 Object* StubCache::ComputeStoreGlobal(String* name, |
| 375 GlobalObject* receiver, | 380 GlobalObject* receiver, |
| 376 JSGlobalPropertyCell* cell) { | 381 JSGlobalPropertyCell* cell) { |
| 377 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::STORE_IC, NORMAL); | 382 Code::Flags flags = Code::ComputeMonomorphicFlags(Code::STORE_IC, NORMAL); |
| 378 Object* code = receiver->map()->FindInCodeCache(name, flags); | 383 Object* code = receiver->map()->FindInCodeCache(name, flags); |
| 379 if (code->IsUndefined()) { | 384 if (code->IsUndefined()) { |
| 380 StoreStubCompiler compiler; | 385 StoreStubCompiler compiler; |
| 381 code = compiler.CompileStoreGlobal(receiver, cell, name); | 386 code = compiler.CompileStoreGlobal(receiver, cell, name); |
| 382 if (code->IsFailure()) return code; | 387 if (code->IsFailure()) return code; |
| 383 PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name)); | 388 PROFILE(CodeCreateEvent(Logger::LOAD_IC_TAG, Code::cast(code), name)); |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1318 expected_receiver_type_ = | 1323 expected_receiver_type_ = |
| 1319 FunctionTemplateInfo::cast(signature->receiver()); | 1324 FunctionTemplateInfo::cast(signature->receiver()); |
| 1320 } | 1325 } |
| 1321 } | 1326 } |
| 1322 | 1327 |
| 1323 is_simple_api_call_ = true; | 1328 is_simple_api_call_ = true; |
| 1324 } | 1329 } |
| 1325 | 1330 |
| 1326 | 1331 |
| 1327 } } // namespace v8::internal | 1332 } } // namespace v8::internal |
| OLD | NEW |