OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 5303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5314 Comment cmnt(masm, "[ Load from keyed Property"); | 5314 Comment cmnt(masm, "[ Load from keyed Property"); |
5315 Variable* var = expression_->AsVariableProxy()->AsVariable(); | 5315 Variable* var = expression_->AsVariableProxy()->AsVariable(); |
5316 bool is_global = var != NULL; | 5316 bool is_global = var != NULL; |
5317 ASSERT(!is_global || var->is_global()); | 5317 ASSERT(!is_global || var->is_global()); |
5318 // Inline array load code if inside of a loop. We do not know | 5318 // Inline array load code if inside of a loop. We do not know |
5319 // the receiver map yet, so we initially generate the code with | 5319 // the receiver map yet, so we initially generate the code with |
5320 // a check against an invalid map. In the inline cache code, we | 5320 // a check against an invalid map. In the inline cache code, we |
5321 // patch the map check if appropriate. | 5321 // patch the map check if appropriate. |
5322 | 5322 |
5323 // TODO(x64): Implement inlined loads for keyed properties. | 5323 // TODO(x64): Implement inlined loads for keyed properties. |
| 5324 // Make sure to load length field as a 32-bit quantity. |
5324 // Comment cmnt(masm, "[ Load from keyed Property"); | 5325 // Comment cmnt(masm, "[ Load from keyed Property"); |
5325 | 5326 |
5326 RelocInfo::Mode mode = is_global | 5327 RelocInfo::Mode mode = is_global |
5327 ? RelocInfo::CODE_TARGET_CONTEXT | 5328 ? RelocInfo::CODE_TARGET_CONTEXT |
5328 : RelocInfo::CODE_TARGET; | 5329 : RelocInfo::CODE_TARGET; |
5329 Result answer = cgen_->frame()->CallKeyedLoadIC(mode); | 5330 Result answer = cgen_->frame()->CallKeyedLoadIC(mode); |
5330 // Make sure that we do not have a test instruction after the | 5331 // Make sure that we do not have a test instruction after the |
5331 // call. A test instruction after the call is used to | 5332 // call. A test instruction after the call is used to |
5332 // indicate that we have generated an inline version of the | 5333 // indicate that we have generated an inline version of the |
5333 // keyed load. The explicit nop instruction is here because | 5334 // keyed load. The explicit nop instruction is here because |
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6941 int CompareStub::MinorKey() { | 6942 int CompareStub::MinorKey() { |
6942 // Encode the two parameters in a unique 16 bit value. | 6943 // Encode the two parameters in a unique 16 bit value. |
6943 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); | 6944 ASSERT(static_cast<unsigned>(cc_) < (1 << 15)); |
6944 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); | 6945 return (static_cast<unsigned>(cc_) << 1) | (strict_ ? 1 : 0); |
6945 } | 6946 } |
6946 | 6947 |
6947 | 6948 |
6948 #undef __ | 6949 #undef __ |
6949 | 6950 |
6950 } } // namespace v8::internal | 6951 } } // namespace v8::internal |
OLD | NEW |