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

Side by Side Diff: src/contexts.h

Issue 177683002: Mode clean-up pt 1: rename classic/non-strict mode to sloppy mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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/compiler.cc ('k') | src/debug.cc » ('j') | src/globals.h » ('J')
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 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 PropertyAttributes* attributes, 485 PropertyAttributes* attributes,
486 BindingFlags* binding_flags); 486 BindingFlags* binding_flags);
487 487
488 // Code generation support. 488 // Code generation support.
489 static int SlotOffset(int index) { 489 static int SlotOffset(int index) {
490 return kHeaderSize + index * kPointerSize - kHeapObjectTag; 490 return kHeaderSize + index * kPointerSize - kHeapObjectTag;
491 } 491 }
492 492
493 static int FunctionMapIndex(LanguageMode language_mode, bool is_generator) { 493 static int FunctionMapIndex(LanguageMode language_mode, bool is_generator) {
494 return is_generator 494 return is_generator
495 ? (language_mode == CLASSIC_MODE 495 ? (language_mode == SLOPPY_MODE
496 ? GENERATOR_FUNCTION_MAP_INDEX 496 ? GENERATOR_FUNCTION_MAP_INDEX
497 : STRICT_MODE_GENERATOR_FUNCTION_MAP_INDEX) 497 : STRICT_MODE_GENERATOR_FUNCTION_MAP_INDEX)
498 : (language_mode == CLASSIC_MODE 498 : (language_mode == SLOPPY_MODE
499 ? FUNCTION_MAP_INDEX 499 ? FUNCTION_MAP_INDEX
500 : STRICT_MODE_FUNCTION_MAP_INDEX); 500 : STRICT_MODE_FUNCTION_MAP_INDEX);
501 } 501 }
502 502
503 static const int kSize = kHeaderSize + NATIVE_CONTEXT_SLOTS * kPointerSize; 503 static const int kSize = kHeaderSize + NATIVE_CONTEXT_SLOTS * kPointerSize;
504 504
505 // GC support. 505 // GC support.
506 typedef FixedBodyDescriptor< 506 typedef FixedBodyDescriptor<
507 kHeaderSize, kSize, kSize> ScavengeBodyDescriptor; 507 kHeaderSize, kSize, kSize> ScavengeBodyDescriptor;
508 508
(...skipping 12 matching lines...) Expand all
521 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object); 521 static bool IsBootstrappingOrGlobalObject(Isolate* isolate, Object* object);
522 #endif 522 #endif
523 523
524 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize); 524 STATIC_CHECK(kHeaderSize == Internals::kContextHeaderSize);
525 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex); 525 STATIC_CHECK(EMBEDDER_DATA_INDEX == Internals::kContextEmbedderDataIndex);
526 }; 526 };
527 527
528 } } // namespace v8::internal 528 } } // namespace v8::internal
529 529
530 #endif // V8_CONTEXTS_H_ 530 #endif // V8_CONTEXTS_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/debug.cc » ('j') | src/globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698