| OLD | NEW |
| 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 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 394 // ----------------------------------------------------------------------------- | 394 // ----------------------------------------------------------------------------- |
| 395 // Forward declarations for frequently used classes | 395 // Forward declarations for frequently used classes |
| 396 // (sorted alphabetically) | 396 // (sorted alphabetically) |
| 397 | 397 |
| 398 class FreeStoreAllocationPolicy; | 398 class FreeStoreAllocationPolicy; |
| 399 template <typename T, class P = FreeStoreAllocationPolicy> class List; | 399 template <typename T, class P = FreeStoreAllocationPolicy> class List; |
| 400 | 400 |
| 401 // ----------------------------------------------------------------------------- | 401 // ----------------------------------------------------------------------------- |
| 402 // Declarations for use in both the preparser and the rest of V8. | 402 // Declarations for use in both the preparser and the rest of V8. |
| 403 | 403 |
| 404 // The different language modes that V8 implements. ES5 defines two language | 404 // The Strict Mode (ECMA-262 5th edition, 4.2.2). |
| 405 // modes: an unrestricted mode respectively a strict mode which are indicated by | |
| 406 // SLOPPY_MODE respectively STRICT_MODE in the enum. The harmony spec drafts | |
| 407 // for the next ES standard specify a new third mode which is called 'extended | |
| 408 // mode'. The extended mode is only available if the harmony flag is set. It is | |
| 409 // based on the 'strict mode' and adds new functionality to it. This means that | |
| 410 // most of the semantics of these two modes coincide. | |
| 411 // TODO(rossberg): remove extended mode. | |
| 412 | 405 |
| 413 enum LanguageMode { | 406 enum StrictMode { SLOPPY, STRICT }; |
| 414 SLOPPY_MODE, | |
| 415 STRICT_MODE, | |
| 416 EXTENDED_MODE | |
| 417 }; | |
| 418 | |
| 419 | |
| 420 // The Strict Mode (ECMA-262 5th edition, 4.2.2). | |
| 421 // | |
| 422 // This flag is used in the backend to represent the language mode. So far | |
| 423 // there is no semantic difference between the strict and the extended mode in | |
| 424 // the backend, so both modes are represented by the kStrictMode value. | |
| 425 enum StrictModeFlag { | |
| 426 kSloppyMode, | |
| 427 kStrictMode | |
| 428 }; | |
| 429 | 407 |
| 430 | 408 |
| 431 } } // namespace v8::internal | 409 } } // namespace v8::internal |
| 432 | 410 |
| 433 #endif // V8_GLOBALS_H_ | 411 #endif // V8_GLOBALS_H_ |
| OLD | NEW |