| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 namespace v8 { | 46 namespace v8 { |
| 47 namespace internal { | 47 namespace internal { |
| 48 | 48 |
| 49 // PositionStack is used for on-stack allocation of token positions for | 49 // PositionStack is used for on-stack allocation of token positions for |
| 50 // new expressions. Please look at ParseNewExpression. | 50 // new expressions. Please look at ParseNewExpression. |
| 51 | 51 |
| 52 class PositionStack { | 52 class PositionStack { |
| 53 public: | 53 public: |
| 54 explicit PositionStack(bool* ok) : top_(NULL), ok_(ok) {} | 54 explicit PositionStack(bool* ok) : top_(NULL), ok_(ok) {} |
| 55 ~PositionStack() { ASSERT(!*ok_ || is_empty()); } | 55 ~PositionStack() { |
| 56 ASSERT(!*ok_ || is_empty()); |
| 57 USE(ok_); |
| 58 } |
| 56 | 59 |
| 57 class Element { | 60 class Element { |
| 58 public: | 61 public: |
| 59 Element(PositionStack* stack, int value) { | 62 Element(PositionStack* stack, int value) { |
| 60 previous_ = stack->top(); | 63 previous_ = stack->top(); |
| 61 value_ = value; | 64 value_ = value; |
| 62 stack->set_top(this); | 65 stack->set_top(this); |
| 63 } | 66 } |
| 64 | 67 |
| 65 private: | 68 private: |
| (...skipping 5863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5929 ASSERT(info->isolate()->has_pending_exception()); | 5932 ASSERT(info->isolate()->has_pending_exception()); |
| 5930 } else { | 5933 } else { |
| 5931 result = parser.ParseProgram(); | 5934 result = parser.ParseProgram(); |
| 5932 } | 5935 } |
| 5933 } | 5936 } |
| 5934 info->SetFunction(result); | 5937 info->SetFunction(result); |
| 5935 return (result != NULL); | 5938 return (result != NULL); |
| 5936 } | 5939 } |
| 5937 | 5940 |
| 5938 } } // namespace v8::internal | 5941 } } // namespace v8::internal |
| OLD | NEW |