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

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

Issue 3472006: Prevent modification of cached normalized maps.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 3 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/objects-debug.cc ('k') | test/cctest/test-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 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 2274 matching lines...) Expand 10 before | Expand all | Expand 10 after
2285 } else { 2285 } else {
2286 set_bit_field2(bit_field2() & ~(1 << kAttachedToSharedFunctionInfo)); 2286 set_bit_field2(bit_field2() & ~(1 << kAttachedToSharedFunctionInfo));
2287 } 2287 }
2288 } 2288 }
2289 2289
2290 bool Map::attached_to_shared_function_info() { 2290 bool Map::attached_to_shared_function_info() {
2291 return ((1 << kAttachedToSharedFunctionInfo) & bit_field2()) != 0; 2291 return ((1 << kAttachedToSharedFunctionInfo) & bit_field2()) != 0;
2292 } 2292 }
2293 2293
2294 2294
2295 void Map::set_is_shared(bool value) {
2296 if (value) {
2297 set_bit_field2(bit_field2() | (1 << kIsShared));
2298 } else {
2299 set_bit_field2(bit_field2() & ~(1 << kIsShared));
2300 }
2301 }
2302
2303 bool Map::is_shared() {
2304 return ((1 << kIsShared) & bit_field2()) != 0;
2305 }
2306
2307
2295 JSFunction* Map::unchecked_constructor() { 2308 JSFunction* Map::unchecked_constructor() {
2296 return reinterpret_cast<JSFunction*>(READ_FIELD(this, kConstructorOffset)); 2309 return reinterpret_cast<JSFunction*>(READ_FIELD(this, kConstructorOffset));
2297 } 2310 }
2298 2311
2299 2312
2300 Code::Flags Code::flags() { 2313 Code::Flags Code::flags() {
2301 return static_cast<Flags>(READ_INT_FIELD(this, kFlagsOffset)); 2314 return static_cast<Flags>(READ_INT_FIELD(this, kFlagsOffset));
2302 } 2315 }
2303 2316
2304 2317
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after
3538 #undef WRITE_INT_FIELD 3551 #undef WRITE_INT_FIELD
3539 #undef READ_SHORT_FIELD 3552 #undef READ_SHORT_FIELD
3540 #undef WRITE_SHORT_FIELD 3553 #undef WRITE_SHORT_FIELD
3541 #undef READ_BYTE_FIELD 3554 #undef READ_BYTE_FIELD
3542 #undef WRITE_BYTE_FIELD 3555 #undef WRITE_BYTE_FIELD
3543 3556
3544 3557
3545 } } // namespace v8::internal 3558 } } // namespace v8::internal
3546 3559
3547 #endif // V8_OBJECTS_INL_H_ 3560 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698