| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 if (!maybe_result->ToObject(&result)) return maybe_result; | 198 if (!maybe_result->ToObject(&result)) return maybe_result; |
| 199 } | 199 } |
| 200 } | 200 } |
| 201 return code; | 201 return code; |
| 202 } | 202 } |
| 203 | 203 |
| 204 | 204 |
| 205 MaybeObject* StubCache::ComputeLoadConstant(String* name, | 205 MaybeObject* StubCache::ComputeLoadConstant(String* name, |
| 206 JSObject* receiver, | 206 JSObject* receiver, |
| 207 JSObject* holder, | 207 JSObject* holder, |
| 208 Object* value) { | 208 JSFunction* value) { |
| 209 ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP); | 209 ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP); |
| 210 Code::Flags flags = | 210 Code::Flags flags = |
| 211 Code::ComputeMonomorphicFlags(Code::LOAD_IC, CONSTANT_FUNCTION); | 211 Code::ComputeMonomorphicFlags(Code::LOAD_IC, CONSTANT_FUNCTION); |
| 212 Object* code = receiver->map()->FindInCodeCache(name, flags); | 212 Object* code = receiver->map()->FindInCodeCache(name, flags); |
| 213 if (code->IsUndefined()) { | 213 if (code->IsUndefined()) { |
| 214 LoadStubCompiler compiler; | 214 LoadStubCompiler compiler; |
| 215 { MaybeObject* maybe_code = | 215 { MaybeObject* maybe_code = |
| 216 compiler.CompileLoadConstant(receiver, holder, value, name); | 216 compiler.CompileLoadConstant(receiver, holder, value, name); |
| 217 if (!maybe_code->ToObject(&code)) return maybe_code; | 217 if (!maybe_code->ToObject(&code)) return maybe_code; |
| 218 } | 218 } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 if (!maybe_result->ToObject(&result)) return maybe_result; | 311 if (!maybe_result->ToObject(&result)) return maybe_result; |
| 312 } | 312 } |
| 313 } | 313 } |
| 314 return code; | 314 return code; |
| 315 } | 315 } |
| 316 | 316 |
| 317 | 317 |
| 318 MaybeObject* StubCache::ComputeKeyedLoadConstant(String* name, | 318 MaybeObject* StubCache::ComputeKeyedLoadConstant(String* name, |
| 319 JSObject* receiver, | 319 JSObject* receiver, |
| 320 JSObject* holder, | 320 JSObject* holder, |
| 321 Object* value) { | 321 JSFunction* value) { |
| 322 ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP); | 322 ASSERT(IC::GetCodeCacheForObject(receiver, holder) == OWN_MAP); |
| 323 Code::Flags flags = | 323 Code::Flags flags = |
| 324 Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CONSTANT_FUNCTION); | 324 Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CONSTANT_FUNCTION); |
| 325 Object* code = receiver->map()->FindInCodeCache(name, flags); | 325 Object* code = receiver->map()->FindInCodeCache(name, flags); |
| 326 if (code->IsUndefined()) { | 326 if (code->IsUndefined()) { |
| 327 KeyedLoadStubCompiler compiler; | 327 KeyedLoadStubCompiler compiler; |
| 328 { MaybeObject* maybe_code = | 328 { MaybeObject* maybe_code = |
| 329 compiler.CompileLoadConstant(name, receiver, holder, value); | 329 compiler.CompileLoadConstant(name, receiver, holder, value); |
| 330 if (!maybe_code->ToObject(&code)) return maybe_code; | 330 if (!maybe_code->ToObject(&code)) return maybe_code; |
| 331 } | 331 } |
| (...skipping 1508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1840 expected_receiver_type_ = | 1840 expected_receiver_type_ = |
| 1841 FunctionTemplateInfo::cast(signature->receiver()); | 1841 FunctionTemplateInfo::cast(signature->receiver()); |
| 1842 } | 1842 } |
| 1843 } | 1843 } |
| 1844 | 1844 |
| 1845 is_simple_api_call_ = true; | 1845 is_simple_api_call_ = true; |
| 1846 } | 1846 } |
| 1847 | 1847 |
| 1848 | 1848 |
| 1849 } } // namespace v8::internal | 1849 } } // namespace v8::internal |
| OLD | NEW |