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

Side by Side Diff: src/objects.cc

Issue 67211: Remove some unused macros from objects.cc. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 8 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 | no next file » | 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-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 25 matching lines...) Expand all
36 #include "scanner.h" 36 #include "scanner.h"
37 #include "scopeinfo.h" 37 #include "scopeinfo.h"
38 #include "string-stream.h" 38 #include "string-stream.h"
39 39
40 #ifdef ENABLE_DISASSEMBLER 40 #ifdef ENABLE_DISASSEMBLER
41 #include "disassembler.h" 41 #include "disassembler.h"
42 #endif 42 #endif
43 43
44 namespace v8 { namespace internal { 44 namespace v8 { namespace internal {
45 45
46 #define FIELD_ADDR(p, offset) \
47 (reinterpret_cast<byte*>(p) + offset - kHeapObjectTag)
48
49
50 #define WRITE_FIELD(p, offset, value) \
51 (*reinterpret_cast<Object**>(FIELD_ADDR(p, offset)) = value)
52
53
54 #define WRITE_INT_FIELD(p, offset, value) \
55 (*reinterpret_cast<int*>(FIELD_ADDR(p, offset)) = value)
56
57
58 #define WRITE_BARRIER(object, offset) \
59 Heap::RecordWrite(object->address(), offset);
60
61
62 // Getters and setters are stored in a fixed array property. These are 46 // Getters and setters are stored in a fixed array property. These are
63 // constants for their indices. 47 // constants for their indices.
64 const int kGetterIndex = 0; 48 const int kGetterIndex = 0;
65 const int kSetterIndex = 1; 49 const int kSetterIndex = 1;
66 50
67 bool Object::IsInstanceOf(FunctionTemplateInfo* expected) { 51 bool Object::IsInstanceOf(FunctionTemplateInfo* expected) {
68 // There is a constraint on the object; check 52 // There is a constraint on the object; check
69 if (!this->IsJSObject()) return false; 53 if (!this->IsJSObject()) return false;
70 // Fetch the constructor function of the object 54 // Fetch the constructor function of the object
71 Object* cons_obj = JSObject::cast(this)->map()->constructor(); 55 Object* cons_obj = JSObject::cast(this)->map()->constructor();
(...skipping 7346 matching lines...) Expand 10 before | Expand all | Expand 10 after
7418 // No break point. 7402 // No break point.
7419 if (break_point_objects()->IsUndefined()) return 0; 7403 if (break_point_objects()->IsUndefined()) return 0;
7420 // Single beak point. 7404 // Single beak point.
7421 if (!break_point_objects()->IsFixedArray()) return 1; 7405 if (!break_point_objects()->IsFixedArray()) return 1;
7422 // Multiple break points. 7406 // Multiple break points.
7423 return FixedArray::cast(break_point_objects())->length(); 7407 return FixedArray::cast(break_point_objects())->length();
7424 } 7408 }
7425 7409
7426 7410
7427 } } // namespace v8::internal 7411 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698