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

Side by Side Diff: src/api.h

Issue 10442015: Rollback of r11638, r11636 on trunk branch. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 8 years, 7 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 | « src/SConscript ('k') | src/api.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 NeanderObject::NeanderObject(v8::internal::Object* obj) 98 NeanderObject::NeanderObject(v8::internal::Object* obj)
99 : value_(v8::internal::Handle<v8::internal::JSObject>( 99 : value_(v8::internal::Handle<v8::internal::JSObject>(
100 v8::internal::JSObject::cast(obj))) { } 100 v8::internal::JSObject::cast(obj))) { }
101 101
102 102
103 NeanderArray::NeanderArray(v8::internal::Handle<v8::internal::Object> obj) 103 NeanderArray::NeanderArray(v8::internal::Handle<v8::internal::Object> obj)
104 : obj_(obj) { } 104 : obj_(obj) { }
105 105
106 106
107 v8::internal::Object* NeanderObject::get(int offset) { 107 v8::internal::Object* NeanderObject::get(int offset) {
108 ASSERT(value()->HasFastObjectElements()); 108 ASSERT(value()->HasFastElements());
109 return v8::internal::FixedArray::cast(value()->elements())->get(offset); 109 return v8::internal::FixedArray::cast(value()->elements())->get(offset);
110 } 110 }
111 111
112 112
113 void NeanderObject::set(int offset, v8::internal::Object* value) { 113 void NeanderObject::set(int offset, v8::internal::Object* value) {
114 ASSERT(value_->HasFastObjectElements()); 114 ASSERT(value_->HasFastElements());
115 v8::internal::FixedArray::cast(value_->elements())->set(offset, value); 115 v8::internal::FixedArray::cast(value_->elements())->set(offset, value);
116 } 116 }
117 117
118 118
119 template <typename T> inline T ToCData(v8::internal::Object* obj) { 119 template <typename T> inline T ToCData(v8::internal::Object* obj) {
120 STATIC_ASSERT(sizeof(T) == sizeof(v8::internal::Address)); 120 STATIC_ASSERT(sizeof(T) == sizeof(v8::internal::Address));
121 return reinterpret_cast<T>( 121 return reinterpret_cast<T>(
122 reinterpret_cast<intptr_t>( 122 reinterpret_cast<intptr_t>(
123 v8::internal::Foreign::cast(obj)->foreign_address())); 123 v8::internal::Foreign::cast(obj)->foreign_address()));
124 } 124 }
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 stress_type_ = stress_type; 560 stress_type_ = stress_type;
561 } 561 }
562 562
563 private: 563 private:
564 static v8::Testing::StressType stress_type_; 564 static v8::Testing::StressType stress_type_;
565 }; 565 };
566 566
567 } } // namespace v8::internal 567 } } // namespace v8::internal
568 568
569 #endif // V8_API_H_ 569 #endif // V8_API_H_
OLDNEW
« no previous file with comments | « src/SConscript ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698