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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 Scope* scope, | 393 Scope* scope, |
394 Handle<JSFunction> closure); | 394 Handle<JSFunction> closure); |
395 | 395 |
396 HEnvironment* DiscardInlined(bool drop_extra) { | 396 HEnvironment* DiscardInlined(bool drop_extra) { |
397 HEnvironment* outer = outer_; | 397 HEnvironment* outer = outer_; |
398 while (outer->frame_type() != JS_FUNCTION) outer = outer->outer_; | 398 while (outer->frame_type() != JS_FUNCTION) outer = outer->outer_; |
399 if (drop_extra) outer->Drop(1); | 399 if (drop_extra) outer->Drop(1); |
400 return outer; | 400 return outer; |
401 } | 401 } |
402 | 402 |
| 403 HEnvironment* arguments_environment() { |
| 404 return outer()->frame_type() == ARGUMENTS_ADAPTOR ? outer() : this; |
| 405 } |
| 406 |
403 // Simple accessors. | 407 // Simple accessors. |
404 Handle<JSFunction> closure() const { return closure_; } | 408 Handle<JSFunction> closure() const { return closure_; } |
405 const ZoneList<HValue*>* values() const { return &values_; } | 409 const ZoneList<HValue*>* values() const { return &values_; } |
406 const ZoneList<int>* assigned_variables() const { | 410 const ZoneList<int>* assigned_variables() const { |
407 return &assigned_variables_; | 411 return &assigned_variables_; |
408 } | 412 } |
409 FrameType frame_type() const { return frame_type_; } | 413 FrameType frame_type() const { return frame_type_; } |
410 int parameter_count() const { return parameter_count_; } | 414 int parameter_count() const { return parameter_count_; } |
411 int specials_count() const { return specials_count_; } | 415 int specials_count() const { return specials_count_; } |
412 int local_count() const { return local_count_; } | 416 int local_count() const { return local_count_; } |
(...skipping 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1366 const char* filename_; | 1370 const char* filename_; |
1367 HeapStringAllocator string_allocator_; | 1371 HeapStringAllocator string_allocator_; |
1368 StringStream trace_; | 1372 StringStream trace_; |
1369 int indent_; | 1373 int indent_; |
1370 }; | 1374 }; |
1371 | 1375 |
1372 | 1376 |
1373 } } // namespace v8::internal | 1377 } } // namespace v8::internal |
1374 | 1378 |
1375 #endif // V8_HYDROGEN_H_ | 1379 #endif // V8_HYDROGEN_H_ |
OLD | NEW |