Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: src/objects-inl.h

Issue 147205: X64 Implementation: Implement Generate_Function(Call,Apply) (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/x64/builtins-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 647
648 #define WRITE_DOUBLE_FIELD(p, offset, value) \ 648 #define WRITE_DOUBLE_FIELD(p, offset, value) \
649 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)) = value) 649 (*reinterpret_cast<double*>(FIELD_ADDR(p, offset)) = value)
650 650
651 #define READ_INT_FIELD(p, offset) \ 651 #define READ_INT_FIELD(p, offset) \
652 (*reinterpret_cast<int*>(FIELD_ADDR(p, offset))) 652 (*reinterpret_cast<int*>(FIELD_ADDR(p, offset)))
653 653
654 #define WRITE_INT_FIELD(p, offset, value) \ 654 #define WRITE_INT_FIELD(p, offset, value) \
655 (*reinterpret_cast<int*>(FIELD_ADDR(p, offset)) = value) 655 (*reinterpret_cast<int*>(FIELD_ADDR(p, offset)) = value)
656 656
657 #define READ_INTPTR_FIELD(p, offset) \
658 (*reinterpret_cast<intptr_t*>(FIELD_ADDR(p, offset)))
659
660 #define WRITE_INTPTR_FIELD(p, offset, value) \
661 (*reinterpret_cast<intptr_t*>(FIELD_ADDR(p, offset)) = value)
662
657 #define READ_UINT32_FIELD(p, offset) \ 663 #define READ_UINT32_FIELD(p, offset) \
658 (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset))) 664 (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset)))
659 665
660 #define WRITE_UINT32_FIELD(p, offset, value) \ 666 #define WRITE_UINT32_FIELD(p, offset, value) \
661 (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset)) = value) 667 (*reinterpret_cast<uint32_t*>(FIELD_ADDR(p, offset)) = value)
662 668
663 #define READ_SHORT_FIELD(p, offset) \ 669 #define READ_SHORT_FIELD(p, offset) \
664 (*reinterpret_cast<uint16_t*>(FIELD_ADDR(p, offset))) 670 (*reinterpret_cast<uint16_t*>(FIELD_ADDR(p, offset)))
665 671
666 #define WRITE_SHORT_FIELD(p, offset, value) \ 672 #define WRITE_SHORT_FIELD(p, offset, value) \
(...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after
2296 2302
2297 void JSBuiltinsObject::set_javascript_builtin(Builtins::JavaScript id, 2303 void JSBuiltinsObject::set_javascript_builtin(Builtins::JavaScript id,
2298 Object* value) { 2304 Object* value) {
2299 ASSERT(0 <= id && id < kJSBuiltinsCount); 2305 ASSERT(0 <= id && id < kJSBuiltinsCount);
2300 WRITE_FIELD(this, kJSBuiltinsOffset + (id * kPointerSize), value); 2306 WRITE_FIELD(this, kJSBuiltinsOffset + (id * kPointerSize), value);
2301 WRITE_BARRIER(this, kJSBuiltinsOffset + (id * kPointerSize)); 2307 WRITE_BARRIER(this, kJSBuiltinsOffset + (id * kPointerSize));
2302 } 2308 }
2303 2309
2304 2310
2305 Address Proxy::proxy() { 2311 Address Proxy::proxy() {
2306 return AddressFrom<Address>(READ_INT_FIELD(this, kProxyOffset)); 2312 return AddressFrom<Address>(READ_INTPTR_FIELD(this, kProxyOffset));
2307 } 2313 }
2308 2314
2309 2315
2310 void Proxy::set_proxy(Address value) { 2316 void Proxy::set_proxy(Address value) {
2311 WRITE_INT_FIELD(this, kProxyOffset, OffsetFrom(value)); 2317 WRITE_INTPTR_FIELD(this, kProxyOffset, OffsetFrom(value));
2312 } 2318 }
2313 2319
2314 2320
2315 void Proxy::ProxyIterateBody(ObjectVisitor* visitor) { 2321 void Proxy::ProxyIterateBody(ObjectVisitor* visitor) {
2316 visitor->VisitExternalReference( 2322 visitor->VisitExternalReference(
2317 reinterpret_cast<Address *>(FIELD_ADDR(this, kProxyOffset))); 2323 reinterpret_cast<Address *>(FIELD_ADDR(this, kProxyOffset)));
2318 } 2324 }
2319 2325
2320 2326
2321 ACCESSORS(JSValue, value, Object, kValueOffset) 2327 ACCESSORS(JSValue, value, Object, kValueOffset)
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
2675 #undef WRITE_INT_FIELD 2681 #undef WRITE_INT_FIELD
2676 #undef READ_SHORT_FIELD 2682 #undef READ_SHORT_FIELD
2677 #undef WRITE_SHORT_FIELD 2683 #undef WRITE_SHORT_FIELD
2678 #undef READ_BYTE_FIELD 2684 #undef READ_BYTE_FIELD
2679 #undef WRITE_BYTE_FIELD 2685 #undef WRITE_BYTE_FIELD
2680 2686
2681 2687
2682 } } // namespace v8::internal 2688 } } // namespace v8::internal
2683 2689
2684 #endif // V8_OBJECTS_INL_H_ 2690 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « no previous file | src/x64/builtins-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698